exip  Alpha 0.5.4
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
treeTableSchema.h
Go to the documentation of this file.
1 /*==================================================================*\
2 | EXIP - Embeddable EXI Processor in C |
3 |--------------------------------------------------------------------|
4 | This work is licensed under BSD 3-Clause License |
5 | The full license terms and conditions are located in LICENSE.txt |
6 \===================================================================*/
7 
19 #ifndef TREETABLESCHEMA_H_
20 #define TREETABLESCHEMA_H_
21 
29 #include "procTypes.h"
30 #include "dynamicArray.h"
31 #include "protoGrammars.h"
32 #include "hashtable.h"
33 #include "grammarGenerator.h"
34 
48 {
89 };
90 
91 typedef enum ElemEnum ElemEnum;
92 
95 {
115 };
116 
117 typedef enum AttrEnum AttrEnum;
118 
121 {
124 };
125 
126 typedef struct PfxNsEntry PfxNsEntry;
127 
130 {
134 };
135 
136 typedef struct PfxNsTable PfxNsTable;
137 
141 {
144 };
145 
146 typedef enum FormType FormType;
147 
150 {
153 };
154 
156 
161 {
162  struct TreeTable* treeT;
164 };
165 
167 
176 {
183 
187 
193 
196 
200 
215 };
216 
218 
223 struct TreeTable
224 {
228 
229  struct
230  {
241  } globalDefs;
242 
243  AllocList memList; // Holding the memory allocations for the TreeTable
244 
245 #if HASH_TABLE_USE
246 
250  struct hashtable* typeTbl;
251 
256  struct hashtable* elemTbl;
257 
261  struct hashtable* attrTbl;
262 
266  struct hashtable* groupTbl;
267 
271  struct hashtable* attrGroupTbl;
272 #endif
273 };
274 
275 typedef struct TreeTable TreeTable;
276 
286 struct NsTable
287 {
291 };
292 
293 typedef struct NsTable NsTable;
294 
300 {
305 };
306 
308 
312 {
316 };
317 
319 
327 
334 void destroyTreeTable(TreeTable* treeT);
335 
356 errorCode generateTreeTable(BinaryBuffer buffer, SchemaFormat schemaFormat, EXIOptions* opt, TreeTable* treeT, EXIPSchema* schema);
357 
369 errorCode resolveIncludeImportReferences(EXIPSchema* schema, TreeTable** treeT, unsigned int* count,
370  errorCode (*loadSchemaHandler) (String* namespace, String* schemaLocation, BinaryBuffer** buffers, unsigned int* bufCount, SchemaFormat* schemaFormat, EXIOptions** opt));
371 
392 errorCode resolveTypeHierarchy(EXIPSchema* schema, TreeTable* treeT, unsigned int count, SubstituteTable* subsTbl);
393 
405 errorCode convertTreeTablesToExipSchema(TreeTable* treeT, unsigned int count, EXIPSchema* schema, SubstituteTable* subsTbl);
406 
419 errorCode getTypeQName(EXIPSchema* schema, TreeTable* treeT, const String typeLiteral, QNameID* qname);
420 
431 errorCode getNsList(TreeTable* treeT, String nsList, NsTable* nsTable);
432 
433 #if DEBUG_GRAMMAR_GEN == ON
434 
441 void printTreeTableEntry(TreeTableEntry* treeTableEntryIn, int indentIdx, char *prefix);
442 #endif
443 
444 #endif /* TREETABLESCHEMA_H_ */