Annotation of Amaya/amaya/templateDeclarations.h, revision 1.5
1.1 francesc 1: #ifndef TEMPLATE_DECLARATIONS
2: #define TEMPLATE_DECLARATIONS
3:
1.4 francesc 4: //The predefined library id
1.1 francesc 5: #define PREDEFINED_LIB "-Predefined-"
1.4 francesc 6:
7: //Type natures
1.2 vatton 8: #define COMPONENT 0
9: #define SIMPLE_TYPE 1
1.3 francesc 10: #define XMLELEMENT 2
1.2 vatton 11: #define UNION 3
12:
1.4 francesc 13: //Simple type ids
14: #define XTIGER_NUMBER 0
15: #define XTIGER_STRING 1
16: #define XTIGER_BOOLEAN 2
17: //And for future issues
18: #define XTIGER_CUSTOM 3
1.1 francesc 19:
20: #define THOT_EXPORT extern
21: #include "amaya.h"
22: #include "document.h"
23: #include "mydictionary.h"
24:
1.2 vatton 25: /* Structure of a template */
1.1 francesc 26: struct _XTigerTemplate;
27: typedef struct _XTigerTemplate *XTigerTemplate;
28:
1.5 ! francesc 29: /* Structure of a declaration */
! 30: struct _Declaration;
! 31: typedef struct _Declaration *Declaration;
1.4 francesc 32:
1.2 vatton 33: typedef int SimpleTypeType;
1.1 francesc 34:
1.5 ! francesc 35: #ifdef TEMPLATES
! 36: //List of loaded templates and libraries
! 37: THOT_EXPORT DicDictionary templates;
! 38: #endif
1.1 francesc 39:
1.5 ! francesc 40: /*----------------------------------------------------------------------
! 41: Initializing the template environment
! 42: ----------------------------------------------------------------------*/
! 43: extern void InitializeTemplateEnvironment ( void );
1.2 vatton 44:
45: /*----------------------------------------------------------------------
1.5 ! francesc 46: Creates a new template with its dictionaries and stores it.
! 47: ----------------------------------------------------------------------*/
! 48: extern XTigerTemplate NewXTigerTemplate (const char *templatePath,
! 49: const ThotBool addPredefined );
1.2 vatton 50:
1.1 francesc 51: /*----------------------------------------------------------------------
1.5 ! francesc 52: Creates a new library with its dictionaries and stores it.
1.1 francesc 53: ----------------------------------------------------------------------*/
1.5 ! francesc 54: extern XTigerTemplate NewXTigerLibrary (const char *templatePath,
! 55: const ThotBool addPredefined );
1.1 francesc 56:
1.2 vatton 57: /*----------------------------------------------------------------------
58: ----------------------------------------------------------------------*/
1.5 ! francesc 59: extern void NewSimpleType ( const XTigerTemplate t,
1.2 vatton 60: const char *name,
1.5 ! francesc 61: SimpleTypeType xtype );
1.1 francesc 62:
63: /*----------------------------------------------------------------------
64: ----------------------------------------------------------------------*/
1.5 ! francesc 65: extern void NewComponent ( const XTigerTemplate t,
1.2 vatton 66: const char *name,
67: const Element el );
1.1 francesc 68:
1.2 vatton 69: /*----------------------------------------------------------------------
70: ----------------------------------------------------------------------*/
1.5 ! francesc 71: extern void NewUnion ( const XTigerTemplate t,
1.2 vatton 72: const char *name,
1.5 ! francesc 73: DicDictionary include = NULL,
! 74: DicDictionary exclude = NULL );
1.1 francesc 75:
1.2 vatton 76: /*----------------------------------------------------------------------
77: ----------------------------------------------------------------------*/
1.5 ! francesc 78: extern void NewElement ( const XTigerTemplate t,
1.3 francesc 79: const char *name );
80:
81: /*----------------------------------------------------------------------
82: ----------------------------------------------------------------------*/
83: extern Declaration GetDeclaration(const XTigerTemplate t, const char *name);
84:
1.1 francesc 85:
1.2 vatton 86: /*----------------------------------------------------------------------
87: Free all the space used by a template (also its dictionaries)
88: ----------------------------------------------------------------------*/
89: extern void FreeXTigerTemplate ( XTigerTemplate t );
1.1 francesc 90:
91: /*----------------------------------------------------------------------
1.2 vatton 92: Imports all declarations in a library lib to a template t
1.1 francesc 93: ----------------------------------------------------------------------*/
1.2 vatton 94: extern void AddLibraryDeclarations (XTigerTemplate t, XTigerTemplate lib);
1.1 francesc 95:
1.5 ! francesc 96: extern void PreInstanciateComponents(XTigerTemplate t);
! 97: extern void RedefineSpecialUnions(XTigerTemplate t);
! 98: extern void DumpDeclarations(XTigerTemplate t);
1.4 francesc 99:
1.2 vatton 100: #endif //TEMPLATE_DECLARATIONS
Webmaster