rtEXIEvent.h File Reference
EXI event definitions and functions. More...
#include "rtexisrc/rtEXIExternDefs.h"
#include "rtxsrc/rtxXmlQName.h"
Go to the source code of this file.
Classes | |
struct | _OSEXIEvent |
Enumerations | |
enum | OSEXIEventType |
A structure representing an EXI event. More... | |
Functions | |
EXTERNEXI void | rtEXIEventInit (OSCTXT *pctxt, OSEXIEvent *pEvent, OSEXIEventType type, const OSXMLFullQName *qname) |
This function initializes an event structure. | |
EXTERNEXI OSEXIEvent * | rtEXINewEvent (OSCTXT *pctxt, OSEXIEventType type, const OSXMLFullQName *qname) |
This function allocates a new event structure and initializes it. | |
EXTERNEXI OSEXIEvent * | rtEXINewEventDeepCopy (OSCTXT *pctxt, const OSEXIEvent *pEvent) |
This function creates a deep copy of the given event record. | |
EXTERNEXI void | rtEXIEventDeepCopy (OSCTXT *pctxt, OSEXIEvent *pdest, const OSEXIEvent *psrc) |
This function makes a deep copy of the given Event including the strings inside. | |
EXTERNEXI void | rtEXIEventFreeMem (OSCTXT *pctxt, OSEXIEvent *pEvent, OSBOOL dynamic) |
This function frees all memory within an Event structure. | |
EXTERNEXI OSUINT32 | rtEXIEventHash (const OSEXIEvent *pEvent) |
This function computes a hash code for an event structure. | |
EXTERNEXI OSBOOL | rtEXIEventsEqual (const OSEXIEvent *pEvent1, const OSEXIEvent *pEvent2) |
This function tests if two event structures are equal. | |
EXTERNEXI const OSEXIEvent * | rtEXIGetBaseEvent (const OSEXIEvent *pEvent) |
This function gets the base event corresponding to a given event. | |
EXTERNEXI const char * | rtEXIEventTypeToString (OSEXIEventType type) |
This function returns the textual name for the given event type (for example, "SD", "SE", etc. | |
EXTERNEXI OSUTF8CHAR * | rtEXIEventToString (OSCTXT *pctxt, const OSEXIEvent *pEvent) |
This function returns the full textual description for the given event. | |
EXTERNEXI void | rtEXIEventPrint (const OSEXIEvent *pEvent) |
This function prints information on the given event to stdout. |
Detailed Description
EXI event definitions and functions.
Definition in file rtEXIEvent.h.
Enumeration Type Documentation
enum OSEXIEventType |
A structure representing an EXI event.
An event is a pair of an event type and a possibly null qname. Only SE and AT events accept a qname parameter. For all other events, the static constants defined in this class must be used. Note that SE(*) and AT(*) are represented by SE and AT, respectively.
Definition at line 45 of file rtEXIEvent.h.
Function Documentation
EXTERNEXI void rtEXIEventDeepCopy | ( | OSCTXT * | pctxt, | |
OSEXIEvent * | pdest, | |||
const OSEXIEvent * | psrc | |||
) |
This function makes a deep copy of the given Event including the strings inside.
- Parameters:
-
pctxt Pointer to a context structure. pdest Pointer to Event to receive copied data. psrc Pointer to Event to be copied.
EXTERNEXI void rtEXIEventFreeMem | ( | OSCTXT * | pctxt, | |
OSEXIEvent * | pEvent, | |||
OSBOOL | dynamic | |||
) |
This function frees all memory within an Event structure.
- Parameters:
-
pctxt Pointer to a context structure. pEvent Pointer to Event in which memory will be freed. dynamic Boolean indicating if pEvent is dynamic. If true, the memory for pEvent is freed.
EXTERNEXI OSUINT32 rtEXIEventHash | ( | const OSEXIEvent * | pEvent | ) |
This function computes a hash code for an event structure.
- Parameters:
-
pEvent Pointer to event structure.
- Returns:
- Computed hash code.
EXTERNEXI void rtEXIEventInit | ( | OSCTXT * | pctxt, | |
OSEXIEvent * | pEvent, | |||
OSEXIEventType | type, | |||
const OSXMLFullQName * | qname | |||
) |
This function initializes an event structure.
- Parameters:
-
pctxt Pointer to a context block structure. pEvent Pointer to event structure. type Type of the event. qname QName associated with the event (possibly NULL).
EXTERNEXI void rtEXIEventPrint | ( | const OSEXIEvent * | pEvent | ) |
This function prints information on the given event to stdout.
- Parameters:
-
pEvent Pointer to event structure.
EXTERNEXI OSBOOL rtEXIEventsEqual | ( | const OSEXIEvent * | pEvent1, | |
const OSEXIEvent * | pEvent2 | |||
) |
This function tests if two event structures are equal.
- Parameters:
-
pEvent1 Pointer to event structure. pEvent2 Pointer to event structure.
- Returns:
- True if events are equal.
EXTERNEXI OSUTF8CHAR* rtEXIEventToString | ( | OSCTXT * | pctxt, | |
const OSEXIEvent * | pEvent | |||
) |
This function returns the full textual description for the given event.
This includes the type (for example, "SD", "SE", etc.) and, if SE or AT, the local name or '*'.
- Parameters:
-
pctxt Pointer to a context structure. pEvent Pointer to Event structure.
- Returns:
- Text corresponding to the type.
EXTERNEXI const char* rtEXIEventTypeToString | ( | OSEXIEventType | type | ) |
This function returns the textual name for the given event type (for example, "SD", "SE", etc.
). The code is returned as string literal text.
- Parameters:
-
type Enumerated event type.
- Returns:
- Text corresponding to the type.
EXTERNEXI const OSEXIEvent* rtEXIGetBaseEvent | ( | const OSEXIEvent * | pEvent | ) |
This function gets the base event corresponding to a given event.
For SE or AT events, this is SE(*) or AT(*) respectively. For all other events, it is the event itself.
- Parameters:
-
pEvent Pointer to event structure.
- Returns:
- Pointer to base event.
EXTERNEXI OSEXIEvent* rtEXINewEvent | ( | OSCTXT * | pctxt, | |
OSEXIEventType | type, | |||
const OSXMLFullQName * | qname | |||
) |
This function allocates a new event structure and initializes it.
- Parameters:
-
pctxt Pointer to a context block structure. type Type of the event. qname QName associated with the event (possibly NULL).
- Returns:
- Pointer to allocated event structure or NULL if no dynamic memory available.
EXTERNEXI OSEXIEvent* rtEXINewEventDeepCopy | ( | OSCTXT * | pctxt, | |
const OSEXIEvent * | pEvent | |||
) |
This function creates a deep copy of the given event record.
Memory for the record is allocated using rtxMemAlloc. The record should be freed using rtEXIEventFreeMem.
- Parameters:
-
pctxt Pointer to a context block structure. pEvent Pointer to event record to be copied.
- Returns:
- Pointer to allocated event structure or NULL if no dynamic memory available.