osrtexi.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00048 #ifndef _OSRTEXI_H_
00049 #define _OSRTEXI_H_
00050
00051 #include "rtxsrc/rtxContext.h"
00052 #include "rtxsrc/rtxStack.h"
00053 #include "rtexisrc/rtEXIEncAutomaton.h"
00054 #include "rtexisrc/rtEXIEncStringTables.h"
00055 #include "rtexisrc/rtEXIDecStringTables.h"
00056 #include "rtxsrc/rtxDiagBitTrace.h"
00057
00058 #ifdef __cplusplus
00059 extern "C" {
00060 #endif
00061
00062 #define OSEXINULLINDEX OSUINT32_MAX
00063
00064 #define OSEXI_PRESERVE_DTD 0x80000000
00065 #define OSEXI_PRESERVE_PIS 0x40000000
00066 #define OSEXI_PRESERVE_COMMENTS 0x20000000
00067 #define OSEXI_PRESERVE_PREFIXES 0x10000000
00068 #define OSEXI_PRESERVE_LEXICAL 0x08000000
00069 #define OSEXI_FRAGMENT 0x04000000
00070 #define OSEXI_COMPRESSED 0x02000000
00071 #define OSEXI_ALIGNED 0x01000000
00072 #define OSEXI_PRECOMPRESSED 0x00800000
00073 #define OSEXI_SCHEMA 0x00400000
00074
00075 typedef struct {
00076 OSFreeCtxtAppInfoPtr pFreeFunc;
00077 OSResetCtxtAppInfoPtr pResetFunc;
00078 OSUINT32 options;
00079 OSEXIAutomaton* pCurrAtm;
00080 OSEXIAutomaton* pEncDocAtm;
00081 OSEXIAutomaton* pEncSTypeAtm;
00082 OSEXIAutomaton* pDecDocAtm;
00083 OSRTStack atmStack;
00084 OSRTStack dynAtmStack;
00085 OSEXIEncStringTables encStrTabs;
00086 OSRTHashMap automataMap;
00087
00095 OSEXIEvent* pDecState;
00096
00100 OSXMLFullQName* pDecQName;
00101
00105 const OSUTF8CHAR* pDecValue;
00106
00110 const OSUTF8CHAR* pDecPrefix;
00111
00115 const OSUTF8CHAR* pDecNamespaceURI;
00116
00117 OSEXIDecStringTables decStrTabs;
00118
00119 OSRTDiagBitFieldList bitFieldList;
00120
00125 OSUINT32 blockSize;
00126 OSUINT32 valueCnt;
00127 OSUINT32 firstChannel;
00128 OSUINT32 nmChannels;
00129 OSUINT32* valuesInChannel;
00130 OSUINT32 allocatedValueCnts;
00131 OSRTHashMap attrChannelMap;
00132 size_t lastValuePos;
00133 size_t firstValuePos;
00134 OSUINT32 curAttrChannel;
00135
00136 OSRTBuffer savedBuffer;
00137 OSRTFLAGS savedFlags;
00138 OSOCTET* shadowBuff;
00139 size_t shadowBuffSize;
00140 size_t shadowBuffEnd;
00141
00142 } OSEXICtxtInfo;
00143
00144 #define EXICTXT(pctxt) ((OSEXICtxtInfo*)((pctxt)->pEXIInfo))
00145
00146 typedef struct {
00147 OSBOOL mbOptionsPresent;
00148 OSBOOL mbPreview;
00149 OSUINT32 version;
00150
00151
00152
00153 } OSEXIHeader;
00154
00164 EXTERNEXI int rtEXIInitContext (OSCTXT* pctxt);
00165
00175 EXTERNEXI int rtEXIInitCtxtAppInfo (OSCTXT* pctxt);
00176
00183 EXTERNEXI void rtEXIEnableBitFieldTrace (OSCTXT* pctxt);
00184
00207 #define rtEXISetBufPtr(pctxt,bufaddr,bufsiz) \
00208 rtxCtxtSetBufPtr (pctxt, bufaddr, bufsiz)
00209
00218 #define rtEXIGetMsgPtr(pctxt) (pctxt)->buffer.data
00219
00225 #define rtEXIGetMsgLen(pctxt) (pctxt)->buffer.byteIndex
00226
00238 #define rtEXISetOption(pctxt,option) \
00239 EXICTXT(pctxt)->options |= option;
00240
00252 #define rtEXIClearOption(pctxt,option) \
00253 EXICTXT(pctxt)->options &= ~option;
00254
00268 #define rtEXITestOption(pctxt,option) \
00269 ((EXICTXT(pctxt)->options & option) != 0)
00270
00271 #ifdef __cplusplus
00272 }
00273 #endif
00274
00277 #endif