EXI encode structures and functions.
Classes | |
struct | OSEXIEncStringTable |
This structure defines the structure of the various string table partitions used by the encoder. More... | |
struct | OSEXIEncStringTables |
This structure defines the complete set of string table partitions used by the encoder. More... | |
Functions | |
EXTERNEXI int | rtEXIEncAtmAddTransition (OSCTXT *pctxt, OSEXIAutomaton *pAutomaton, OSEXIState fromState, OSEXIState toState, const OSEXIEvent *pEvent, const OSEXIEventCode *pEventCode) |
This function adds a transition between two states. | |
EXTERNEXI OSEXIEventCode * | rtEXIEncAutomatonAdvance (OSCTXT *pctxt, OSEXIAutomaton *pAutomaton, const OSEXIEvent *pEvent, OSBOOL dynamicItems) |
This function advances the encoder automaton based on event, adding new transitions if dynamicItems is set to true and either SE(*) or AT(*) are matched instead of SE(qname) or AT(qname), respectively. | |
EXTERNEXI OSEXIAutomaton * | rtEXIEncGetDocAutomaton (OSCTXT *pctxt, size_t numGblElems, const OSXMLFullQName *gblElems) |
This functions returns an automaton that accepts the built-in document grammar. | |
EXTERNEXI OSEXIAutomaton * | rtEXIEncGetElemAutomaton (OSCTXT *pctxt, OSXMLFullQName *pqname) |
This function returns an automaton that accepts the built-in element grammar. | |
EXTERNEXI void | rtEXIEncStringTableInit (OSCTXT *pctxt, OSEXIEncStringTable *pstrtab, size_t capacity) |
This function initializes the given string table structure. | |
EXTERNEXI OSEXIEncStringTable * | rtEXIEncNewStringTable (OSCTXT *pctxt, size_t capacity) |
This function allocates and initializes a new string table structure. | |
EXTERNEXI void | rtEXIEncStringTableClear (OSCTXT *pctxt, OSEXIEncStringTable *pstrtab) |
This function clears all strings out of the existing table. | |
EXTERNEXI OSUINT32 | rtEXIEncStringTableAdd (OSCTXT *pctxt, OSEXIEncStringTable *pstrtab, const OSUTF8CHAR *str) |
This function adds a string to the given string table. | |
EXTERNEXI OSUINT32 | rtEXIEncStringTableGetIndex (OSEXIEncStringTable *pstrtab, const OSUTF8CHAR *str) |
This function gets the index (i.e. | |
EXTERNEXI void | rtEXIEncStrTabsInit (OSCTXT *pctxt, OSEXIEncStringTables *pstrtabs) |
This function initializes all EXI string table partitions. | |
EXTERNEXI void | rtEXIEncStrTabsClear (OSCTXT *pctxt, OSEXIEncStringTables *pstrtabs) |
This function clears all EXI string table partitions. | |
EXTERNEXI OSUINT32 | rtEXIEncStrTabsAddURI (OSCTXT *pctxt, OSEXIEncStringTables *pstrtabs, const OSUTF8CHAR *uri) |
This function will add a URI to the URI string table partition. | |
EXTERNEXI OSUINT32 | rtEXIEncStrTabsGetURIID (OSEXIEncStringTables *pstrtabs, const OSUTF8CHAR *uri) |
This function will get the compact identifier of the given URI from the URI string table partition. | |
EXTERNEXI OSUINT32 | rtEXIEncStrTabsGetURITableSize (OSEXIEncStringTables *pstrtabs) |
This function returns the current number of entries in the URI string table partition. | |
EXTERNEXI OSUINT32 | rtEXIEncStrTabsAddPrefix (OSCTXT *pctxt, OSEXIEncStringTables *pstrtabs, const OSUTF8CHAR *uri, const OSUTF8CHAR *prefix) |
This function adds the given prefix to the prefix table partition identified by the given URI. | |
EXTERNEXI OSUINT32 | rtEXIEncStrTabsGetPrefixID (OSEXIEncStringTables *pstrtabs, const OSUTF8CHAR *uri, const OSUTF8CHAR *prefix) |
This function will get the compact identifier of the given prefix from the prefix string table partition identified by the given URI. | |
EXTERNEXI OSUINT32 | rtEXIEncStrTabsGetPrefixTableSize (OSEXIEncStringTables *pstrtabs, const OSUTF8CHAR *uri) |
This function returns the current number of entries in the prefix string table partition identified by the given URI. | |
EXTERNEXI OSUINT32 | rtEXIEncStrTabsAddLocalName (OSCTXT *pctxt, OSEXIEncStringTables *pstrtabs, const OSUTF8CHAR *uri, const OSUTF8CHAR *name) |
This function adds the given local name to the local name table partition identified by the given URI. | |
EXTERNEXI OSUINT32 | rtEXIEncStrTabsGetLocalNameID (OSEXIEncStringTables *pstrtabs, const OSUTF8CHAR *uri, const OSUTF8CHAR *name) |
This function will get the compact identifier of the given localName from the localName string table partition identified by the given URI. | |
EXTERNEXI OSUINT32 | rtEXIEncStrTabsGetLocalNameTableSize (OSEXIEncStringTables *pstrtabs, const OSUTF8CHAR *uri) |
This function returns the current number of entries in the localName string table partition identified by the given URI. | |
EXTERNEXI OSUINT32 | rtEXIEncStrTabsAddLocalValue (OSCTXT *pctxt, OSEXIEncStringTables *pstrtabs, const OSXMLFullQName *qname, const OSUTF8CHAR *value) |
This function adds the given local value to the local value table partition identified by the given QName. | |
EXTERNEXI OSUINT32 | rtEXIEncStrTabsGetLocalValueID (OSEXIEncStringTables *pstrtabs, const OSXMLFullQName *qname, const OSUTF8CHAR *value) |
This function will get the compact identifier of the given local value from the local value string table partition identified by the given QName. | |
EXTERNEXI OSUINT32 | rtEXIEncStrTabsGetLocalValueTableSize (OSEXIEncStringTables *pstrtabs, const OSXMLFullQName *qname) |
This function returns the current number of entries in the local value string table partition identified by the given QName. | |
EXTERNEXI OSUINT32 | rtEXIEncStrTabsAddGlobalValue (OSCTXT *pctxt, OSEXIEncStringTables *pstrtabs, const OSUTF8CHAR *value) |
This function will add a string value to the global value string table partition. | |
EXTERNEXI OSUINT32 | rtEXIEncStrTabsGetGlobalValueID (OSEXIEncStringTables *pstrtabs, const OSUTF8CHAR *value) |
This function will get the compact identifier of the given string value from the global value string table partition. | |
EXTERNEXI OSUINT32 | rtEXIEncStrTabsGetGlobalValueTableSize (OSEXIEncStringTables *pstrtabs) |
This function returns the current number of entries in the global value string table partition. |
Function Documentation
EXTERNEXI int rtEXIEncAtmAddTransition | ( | OSCTXT * | pctxt, | |
OSEXIAutomaton * | pAutomaton, | |||
OSEXIState | fromState, | |||
OSEXIState | toState, | |||
const OSEXIEvent * | pEvent, | |||
const OSEXIEventCode * | pEventCode | |||
) |
This function adds a transition between two states.
The transition is defined by a pair of states, and event and event code.
- Parameters:
-
pctxt Pointer to context block structure. pAutomaton Pointer to automaton structure. fromState The origin state for this transition. toState The destination state for this transition. pEvent The event on which this transition occurs. pEventCode The event code returned after the transition.
- Returns:
- Zero if operation was successful; a negative status code otherwise.
EXTERNEXI OSEXIEventCode* rtEXIEncAutomatonAdvance | ( | OSCTXT * | pctxt, | |
OSEXIAutomaton * | pAutomaton, | |||
const OSEXIEvent * | pEvent, | |||
OSBOOL | dynamicItems | |||
) |
This function advances the encoder automaton based on event, adding new transitions if dynamicItems
is set to true
and either SE(*) or AT(*) are matched instead of SE(qname) or AT(qname), respectively.
Dynamic transitions for CH are also added according to the spec.
- Parameters:
-
pctxt Pointer to context block structure. pAutomaton Pointer to automaton structure. pEvent Event on which to advance the automaton. dynamicItems Flag to add dynamic transitions to the automaton.
- Returns:
- The event code returned as a result of this transition.
EXTERNEXI OSEXIAutomaton* rtEXIEncGetDocAutomaton | ( | OSCTXT * | pctxt, | |
size_t | numGblElems, | |||
const OSXMLFullQName * | gblElems | |||
) |
This functions returns an automaton that accepts the built-in document grammar.
This grammar is not extensible, so all the event codes created are immutable.
- Parameters:
-
pctxt Pointer to context block structure. numGblElems Number of global elements. gblElems Array of global element objects.
- Returns:
- Pointer to document automaton.
EXTERNEXI OSEXIAutomaton* rtEXIEncGetElemAutomaton | ( | OSCTXT * | pctxt, | |
OSXMLFullQName * | pqname | |||
) |
This function returns an automaton that accepts the built-in element grammar.
The elementName
is associated with the automaton.
- Parameters:
-
pctxt Pointer to context block structure. pqname Pointer to element QName.
- Returns:
- Pointer to element automaton.
EXTERNEXI OSEXIEncStringTable* rtEXIEncNewStringTable | ( | OSCTXT * | pctxt, | |
size_t | capacity | |||
) |
This function allocates and initializes a new string table structure.
- Parameters:
-
pctxt Pointer to context block structure. capacity Capacity of the hash map or zero to use default.
- Returns:
- Allocated string table structure.
EXTERNEXI OSUINT32 rtEXIEncStringTableAdd | ( | OSCTXT * | pctxt, | |
OSEXIEncStringTable * | pstrtab, | |||
const OSUTF8CHAR * | str | |||
) |
This function adds a string to the given string table.
The string is not added if it already exists in the table. Its compact identifier is returned in either case.
- Parameters:
-
pctxt Pointer to context block structure. pstrtab Pointer to string table structure. str Pointer to string to be added to table. A copy of the string is not made; the pointer is simply added to the table.
- Returns:
- Index of string in table. Note that this is an unsigned value and therefore a negative value cannot be used to signal an error condition as in other functions. In this case, the user must check the status value within the error information in the context to determine if an error occurred.
EXTERNEXI void rtEXIEncStringTableClear | ( | OSCTXT * | pctxt, | |
OSEXIEncStringTable * | pstrtab | |||
) |
This function clears all strings out of the existing table.
- Parameters:
-
pctxt Pointer to context block structure. pstrtab Pointer to string table structure.
EXTERNEXI OSUINT32 rtEXIEncStringTableGetIndex | ( | OSEXIEncStringTable * | pstrtab, | |
const OSUTF8CHAR * | str | |||
) |
This function gets the index (i.e.
compact identifier) of a string in the given string table.
- Parameters:
-
pstrtab Pointer to string table structure. str Pointer to string to be added to table. A copy of the string is not made; the pointer is simply added to the table.
- Returns:
- Index of string in table. Note that this is an unsigned value. If the string is not found or an error occurs, the unsigned integer max value is returned (OSUINT32_MAX).
EXTERNEXI void rtEXIEncStringTableInit | ( | OSCTXT * | pctxt, | |
OSEXIEncStringTable * | pstrtab, | |||
size_t | capacity | |||
) |
This function initializes the given string table structure.
- Parameters:
-
pctxt Pointer to context block structure. pstrtab Pointer to string table structure. capacity Capacity of the hash map or zero to use default.
EXTERNEXI OSUINT32 rtEXIEncStrTabsAddGlobalValue | ( | OSCTXT * | pctxt, | |
OSEXIEncStringTables * | pstrtabs, | |||
const OSUTF8CHAR * | value | |||
) |
This function will add a string value to the global value string table partition.
- Parameters:
-
pctxt Pointer to context block structure. pstrtabs Pointer to full string table set structure. value Value to be added.
- Returns:
- Index (compact identifier) of the added value.
EXTERNEXI OSUINT32 rtEXIEncStrTabsAddLocalName | ( | OSCTXT * | pctxt, | |
OSEXIEncStringTables * | pstrtabs, | |||
const OSUTF8CHAR * | uri, | |||
const OSUTF8CHAR * | name | |||
) |
This function adds the given local name to the local name table partition identified by the given URI.
- Parameters:
-
pctxt Pointer to context block structure. pstrtabs Pointer to full string table set structure. uri URI identifier of local name table partition. name Name to be added.
- Returns:
- Index (compact identifier) of the added value.
EXTERNEXI OSUINT32 rtEXIEncStrTabsAddLocalValue | ( | OSCTXT * | pctxt, | |
OSEXIEncStringTables * | pstrtabs, | |||
const OSXMLFullQName * | qname, | |||
const OSUTF8CHAR * | value | |||
) |
This function adds the given local value to the local value table partition identified by the given QName.
- Parameters:
-
pctxt Pointer to context block structure. pstrtabs Pointer to full string table set structure. qname QName identifier of local value table partition. value Value to be added.
- Returns:
- Index (compact identifier) of the added value.
EXTERNEXI OSUINT32 rtEXIEncStrTabsAddPrefix | ( | OSCTXT * | pctxt, | |
OSEXIEncStringTables * | pstrtabs, | |||
const OSUTF8CHAR * | uri, | |||
const OSUTF8CHAR * | prefix | |||
) |
This function adds the given prefix to the prefix table partition identified by the given URI.
- Parameters:
-
pctxt Pointer to context block structure. pstrtabs Pointer to full string table set structure. uri URI identifier of prefix table partition. prefix Prefix to be added.
- Returns:
- Index (compact identifier) of the added value.
EXTERNEXI OSUINT32 rtEXIEncStrTabsAddURI | ( | OSCTXT * | pctxt, | |
OSEXIEncStringTables * | pstrtabs, | |||
const OSUTF8CHAR * | uri | |||
) |
This function will add a URI to the URI string table partition.
- Parameters:
-
pctxt Pointer to context block structure. pstrtabs Pointer to full string table set structure. uri URI to be added.
- Returns:
- Index (compact identifier) of the added URI.
EXTERNEXI void rtEXIEncStrTabsClear | ( | OSCTXT * | pctxt, | |
OSEXIEncStringTables * | pstrtabs | |||
) |
This function clears all EXI string table partitions.
- Parameters:
-
pctxt Pointer to context block structure. pstrtabs Pointer to string table set structure.
EXTERNEXI OSUINT32 rtEXIEncStrTabsGetGlobalValueID | ( | OSEXIEncStringTables * | pstrtabs, | |
const OSUTF8CHAR * | value | |||
) |
This function will get the compact identifier of the given string value from the global value string table partition.
- Parameters:
-
pstrtabs Pointer to full string table set structure. value Value to be looked up.
- Returns:
- Index (compact identifier) or the null index identifier (OSEXINULLINDEX) if not found.
EXTERNEXI OSUINT32 rtEXIEncStrTabsGetGlobalValueTableSize | ( | OSEXIEncStringTables * | pstrtabs | ) |
This function returns the current number of entries in the global value string table partition.
- Parameters:
-
pstrtabs Pointer to full string table set structure.
- Returns:
- Current number of entries in the partition.
EXTERNEXI OSUINT32 rtEXIEncStrTabsGetLocalNameID | ( | OSEXIEncStringTables * | pstrtabs, | |
const OSUTF8CHAR * | uri, | |||
const OSUTF8CHAR * | name | |||
) |
This function will get the compact identifier of the given localName from the localName string table partition identified by the given URI.
- Parameters:
-
pstrtabs Pointer to full string table set structure. uri URI identifier of localName table partition. name Name to be looked up.
- Returns:
- Index (compact identifier) of the value.
EXTERNEXI OSUINT32 rtEXIEncStrTabsGetLocalNameTableSize | ( | OSEXIEncStringTables * | pstrtabs, | |
const OSUTF8CHAR * | uri | |||
) |
This function returns the current number of entries in the localName string table partition identified by the given URI.
- Parameters:
-
pstrtabs Pointer to full string table set structure. uri URI identifier of localName table partition.
- Returns:
- Current number of entries in the partition.
EXTERNEXI OSUINT32 rtEXIEncStrTabsGetLocalValueID | ( | OSEXIEncStringTables * | pstrtabs, | |
const OSXMLFullQName * | qname, | |||
const OSUTF8CHAR * | value | |||
) |
This function will get the compact identifier of the given local value from the local value string table partition identified by the given QName.
- Parameters:
-
pstrtabs Pointer to full string table set structure. qname Identifier of table partition. value Value to be looked up.
- Returns:
- Index (compact identifier) of the value.
EXTERNEXI OSUINT32 rtEXIEncStrTabsGetLocalValueTableSize | ( | OSEXIEncStringTables * | pstrtabs, | |
const OSXMLFullQName * | qname | |||
) |
This function returns the current number of entries in the local value string table partition identified by the given QName.
- Parameters:
-
pstrtabs Pointer to full string table set structure. qname Identifier of table partition.
- Returns:
- Current number of entries in the partition.
EXTERNEXI OSUINT32 rtEXIEncStrTabsGetPrefixID | ( | OSEXIEncStringTables * | pstrtabs, | |
const OSUTF8CHAR * | uri, | |||
const OSUTF8CHAR * | prefix | |||
) |
This function will get the compact identifier of the given prefix from the prefix string table partition identified by the given URI.
- Parameters:
-
pstrtabs Pointer to full string table set structure. uri URI identifier of prefix table partition. prefix Prefix to be looked up.
- Returns:
- Index (compact identifier) of the value.
EXTERNEXI OSUINT32 rtEXIEncStrTabsGetPrefixTableSize | ( | OSEXIEncStringTables * | pstrtabs, | |
const OSUTF8CHAR * | uri | |||
) |
This function returns the current number of entries in the prefix string table partition identified by the given URI.
- Parameters:
-
pstrtabs Pointer to full string table set structure. uri URI identifier of prefix table partition.
- Returns:
- Current number of entries in the partition.
EXTERNEXI OSUINT32 rtEXIEncStrTabsGetURIID | ( | OSEXIEncStringTables * | pstrtabs, | |
const OSUTF8CHAR * | uri | |||
) |
This function will get the compact identifier of the given URI from the URI string table partition.
- Parameters:
-
pstrtabs Pointer to full string table set structure. uri URI to be looked up.
- Returns:
- Index (compact identifier) or the null index identifier (OSEXINULLINDEX) if not found.
EXTERNEXI OSUINT32 rtEXIEncStrTabsGetURITableSize | ( | OSEXIEncStringTables * | pstrtabs | ) |
This function returns the current number of entries in the URI string table partition.
- Parameters:
-
pstrtabs Pointer to full string table set structure.
- Returns:
- Current number of entries in the partition.
EXTERNEXI void rtEXIEncStrTabsInit | ( | OSCTXT * | pctxt, | |
OSEXIEncStringTables * | pstrtabs | |||
) |
This function initializes all EXI string table partitions.
- Parameters:
-
pctxt Pointer to context block structure. pstrtabs Pointer to string table set structure.