exip  Alpha 0.5.4
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sTables.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 
17 #ifndef STABLES_H_
18 #define STABLES_H_
19 
20 #include "procTypes.h"
21 #include "errorHandle.h"
22 
23 #define DEFAULT_VALUE_ENTRIES_NUMBER 50
24 #define DEFAULT_URI_ENTRIES_NUMBER 4
25 #define DEFAULT_PFX_ENTRIES_NUMBER 1
26 #define DEFAULT_LN_ENTRIES_NUMBER 10
27 #define DEFAULT_VX_ENTRIES_NUMBER 10
28 
29 // Get local name entry from pointer to URI table using QNameID
30 #define GET_LN_P_URI_QNAME(uriTable, qnameID) ((uriTable)->uri[(qnameID).uriId].lnTable.ln[(qnameID).lnId])
31 
32 // Get local name entry from URI table using QNameID
33 #define GET_LN_URI_QNAME(uriTable, qnameID) ((uriTable).uri[(qnameID).uriId].lnTable.ln[(qnameID).lnId])
34 
35 // Get local name entry from pointer to URI table using QNameID pointer
36 #define GET_LN_P_URI_P_QNAME(uriTable, qnameID) ((uriTable)->uri[(qnameID)->uriId].lnTable.ln[(qnameID)->lnId])
37 
38 // Get local name entry from URI table using QNameID pointer
39 #define GET_LN_URI_P_QNAME(uriTable, qnameID) ((uriTable).uri[(qnameID)->uriId].lnTable.ln[(qnameID)->lnId])
40 
41 // Get local name entry from pointer to URI table using separate URI and LN IDs
42 #define GET_LN_P_URI_IDS(uriTable, uriId, lnId) ((uriTable)->uri[uriId].lnTable.ln[lnId])
43 
44 // Get local name entry from URI table using separate URI and LN IDs
45 #define GET_LN_URI_IDS(uriTable, uriId, lnId) ((uriTable).uri[uriId].lnTable.ln[lnId])
46 
47 
55 
64 errorCode addUriEntry(UriTable* uriTable, String uriStr, SmallIndex* uriEntryId);
65 
74 errorCode addLnEntry(LnTable* lnTable, String lnStr, Index* lnEntryId);
75 
84 errorCode addValueEntry(EXIStream* strm, String valueStr, QNameID qnameID);
85 
94 errorCode addPfxEntry(PfxTable* pfxTable, String pfxStr, SmallIndex* pfxEntryId);
95 
108 errorCode createUriTableEntry(UriTable* uriTable, const String uri, int createPfx,
109  const String pfx, const String* lnBase, Index lnSize);
110 
123 errorCode createUriTableEntries(UriTable* uriTable, boolean withSchema);
124 
134 boolean lookupUri(UriTable* uriTable, String uriStr, SmallIndex* uriEntryId);
135 
146 boolean lookupLn(LnTable* lnTable, String lnStr, Index* lnEntryId);
147 
157 boolean lookupPfx(PfxTable* pfxTable, String pfxStr, SmallIndex* pfxEntryId);
158 
159 #if VALUE_CROSSTABLE_USE
160 
172 boolean lookupVx(ValueTable* valueTable, VxTable* vxTable, String valueStr, Index* vxEntryId);
173 #endif
174 
185 boolean lookupValue(ValueTable* valueTable, String valueStr, Index* valueEntryId);
186 
187 #endif /* STABLES_H_ */