rtxContext.h File Reference
Common run-time context definitions. More...
#include "rtxsrc/rtxDList.h"
Go to the source code of this file.
Classes | |
struct | OSRTErrLocn |
Run-time error location structure. More... | |
struct | OSRTErrInfo |
Run-time error information structure. More... | |
struct | OSRTErrInfoList |
struct | OSRTBuffer |
Run-time message buffer structure. More... | |
struct | OSRTBufSave |
Structure to save the current message buffer state. More... | |
struct | OSCTXT |
Run-time context structure. More... | |
Defines | |
#define | OSRTENCBUFSIZ 16*1024 |
#define | OSRTERRSTKSIZ 8 |
#define | OSRTMAXERRPRM 5 |
#define | OSDIAG 0x80000000 |
#define | OSTRACE 0x40000000 |
#define | OSDISSTRM 0x20000000 |
#define | OSNOSTRMBACKOFF 0x8000000 |
#define | OSCDECL |
#define | OSRT_GET_FIRST_ERROR_INFO(pctxt) |
#define | OSRT_GET_LAST_ERROR_INFO(pctxt) |
#define | OSRTISSTREAM(pctxt) ((pctxt)->pStream != 0 && !((pctxt)->flags & OSDISSTRM)) |
#define | OSRTBUFSAVE(pctxt) |
#define | OSRTBUFRESTORE(pctxt) |
#define | rtxCtxtGetMsgPtr(pctxt) (pctxt)->buffer.data |
This macro returns the start address of an encoded message. | |
#define | rtxCtxtGetMsgLen(pctxt) (pctxt)->buffer.byteIndex |
This macro returns the length of an encoded message. | |
#define | rtxCtxtTestFlag(pctxt, mask) ((pctxt->flags & mask) != 0) |
This macro tests if the given bit flag is set in the context. | |
#define | rtxCtxtPeekElemName(pctxt) |
This macro returns the last element name from the context stack. | |
#define | rtxByteAlign(pctxt) |
This macro will byte-align the context buffer. | |
Typedefs | |
typedef OSUINT32 | OSRTFLAGS |
typedef int(*) | OSFreeCtxtAppInfoPtr (struct OSCTXT *pctxt) |
OSRTFreeCtxtAppInfoPtr is a pointer to pctxt->pAppInfo free function, The pctxt->pAppInfo (pXMLInfo and pASN1Info) should contain the pointer to a structure and its first member should be a pointer to an appInfo free function. | |
typedef int(*) | OSResetCtxtAppInfoPtr (struct OSCTXT *pctxt) |
OSRTResetCtxtAppInfoPtr is a pointer to pctxt->pAppInfo reset function, The pctxt->pAppInfo (pXMLInfo and pASN1Info) should contain the pointer to a structure and its second member should be a pointer to appInfo reset function. | |
typedef void(*) | OSFreeCtxtGlobalPtr (struct OSCTXT *pctxt) |
OSRTFreeCtxtGlobalPtr is a pointer to a memory free function. | |
typedef void *OSCDECL * | OSMallocFunc (size_t size) |
typedef void *OSCDECL * | OSReallocFunc (void *ptr, size_t size) |
Functions | |
EXTERNRT int | rtxInitContext (OSCTXT *pctxt) |
This function initializes an OSCTXT block. | |
EXTERNRT int | rtxInitContextExt (OSCTXT *pctxt, OSMallocFunc malloc_func, OSReallocFunc realloc_func, OSFreeFunc free_func) |
This function initializes an OSCTXT block. | |
EXTERNRT int | rtxInitThreadContext (OSCTXT *pctxt, const OSCTXT *pSrcCtxt) |
This function initializes a context for use in a thread. | |
EXTERNRT int | rtxInitContextBuffer (OSCTXT *pctxt, OSOCTET *bufaddr, size_t bufsiz) |
This function assigns a message buffer to a context block. | |
EXTERNRT int | rtxCtxtSetBufPtr (OSCTXT *pctxt, OSOCTET *bufaddr, size_t bufsiz) |
This function is used to set the internal buffer pointer for in-memory encoding or decoding. | |
EXTERNRT size_t | rtxCtxtGetBitOffset (OSCTXT *pctxt) |
This function returns the total bit offset to the current element in the context buffer. | |
EXTERNRT size_t | rtxCtxtGetIOByteCount (OSCTXT *pctxt) |
This function returns the count of bytes either written to a stream or memory buffer. | |
EXTERNRT int | rtxCheckContext (OSCTXT *pctxt) |
This function verifies that the given context structure is initialized and ready for use. | |
EXTERNRT void | rtxFreeContext (OSCTXT *pctxt) |
This function frees all dynamic memory associated with a context. | |
EXTERNRT void | rtxCopyContext (OSCTXT *pdest, OSCTXT *psrc) |
This function creates a copy of a context structure. | |
EXTERNRT void | rtxCtxtSetFlag (OSCTXT *pctxt, OSUINT32 mask) |
This function is used to set a processing flag within the context structure. | |
EXTERNRT void | rtxCtxtClearFlag (OSCTXT *pctxt, OSUINT32 mask) |
This function is used to clear a processing flag within the context structure. | |
EXTERNRT int | rtxCtxtPushElemName (OSCTXT *pctxt, const OSUTF8CHAR *elemName) |
This function is used to push an element name onto the context element name stack. | |
EXTERNRT const OSUTF8CHAR * | rtxCtxtPopElemName (OSCTXT *pctxt) |
This function pops the last element name from the context stack. | |
EXTERNRT void | rtxMemHeapSetFlags (OSCTXT *pctxt, OSUINT32 flags) |
This function sets flags to a heap. | |
EXTERNRT void | rtxMemHeapClearFlags (OSCTXT *pctxt, OSUINT32 flags) |
This function clears memory heap flags. | |
EXTERNRT void | rtxMemHeapSetDefBlkSize (OSCTXT *pctxt, OSUINT32 blkSize) |
This function sets the minimum size and the granularity of memory blocks in memory heap for the context. | |
EXTERNRT OSUINT32 | rtxMemHeapGetDefBlkSize (OSCTXT *pctxt) |
This function returns the actual granularity of memory blocks in the context. |
Detailed Description
Common run-time context definitions.
Definition in file rtxContext.h.