#include "mxflib/mxflib.h"
#include <stdarg.h>
Namespaces | |
namespace | mxflib |
Typedefs | |
typedef ConstClassRecord const * | ConstClassRecordPTR |
Enumerations | |
enum | TypesCurrentState { StateIdle = 0, StateTypes, StateTypesBasic, StateTypesInterpretation, StateTypesMultiple, StateTypesCompound, StateTypesCompoundItem, StateTypesEnum, StateTypesEnumValue, StateTypesLabel, StateDone } |
State-machine state for XML parsing. More... | |
enum | DictCurrentState { DictStateIdle = 0, DictStateDictionary, DictStateTypes, DictStateClasses, DictStateError } |
State-machine state for XML parsing. More... | |
Functions | |
void | DefTypes_startElement (void *user_data, const char *name, const char **attrs) |
XML parsing functions for defining types. | |
void | DefTypes_endElement (void *user_data, const char *name) |
void | DictLoad_startElement (void *user_data, const char *name, const char **attrs) |
XML parsing functions for dictionary loading. | |
void | DictLoad_endElement (void *user_data, const char *name) |
bool | ProcessClassElement (void *user_data, const char *name, const char **attrs) |
Process an XML element that has been determined to be part of a class definition. | |
void | XML_warning (void *user_data, const char *msg,...) |
XML callback - Handle warnings during XML parsing. | |
void | XML_error (void *user_data, const char *msg,...) |
XML callback - Handle errors during XML parsing. | |
void | XML_fatalError (void *user_data, const char *msg,...) |
XML callback - Handle fatal errors during XML parsing. | |
bool | DisableBuiltInTraits (void) |
Disable automatic loading of built-in traits. | |
void | DefineTraits (void) |
Build the map of all known traits. | |
int | ReadHexStringOrUL (const char *Source, int Max, UInt8 *Dest, const char *Sep) |
Read hex values separated by any of 'Sep', if it is a urn read any of the supported formats via StringToUL. | |
int | LoadTypes (char *TypesFile, SymbolSpacePtr DefaultSymbolSpace) |
Load types from the specified XML definitions. | |
int | LoadTypes (const ConstTypeRecord *TypesData, SymbolSpacePtr DefaultSymbolSpace) |
Load types from the specified in-memory definitions. | |
int | LoadTypes (TypeRecordList &TypesData, SymbolSpacePtr DefaultSymbolSpace) |
Load types from the specified in-memory definitions. | |
void | DefTypes_startElement (void *user_data, const char *name, const char **attrs) |
XML callback - Deal with start tag of an element. | |
void | DefTypes_endElement (void *user_data, const char *name) |
XML callback - Deal with end tag of an element. | |
int | LoadClasses (ClassRecordList &ClassesData, SymbolSpacePtr DefaultSymbolSpace) |
Load classes from the specified in-memory definitions. | |
ClassRecordPtr | LoadClassesSub (ConstClassRecordPTR &ClassData, SymbolSpacePtr DefaultSymbolSpace) |
File local function to build class list from the specified in-memory definitions. | |
int | LoadClasses (const ConstClassRecord *ClassData, SymbolSpacePtr DefaultSymbolSpace) |
Load classeses from the specified in-memory definitions. | |
int | LoadDictionary (DictionaryPtr &DictionaryData, SymbolSpacePtr DefaultSymbolSpace, bool FastFail) |
Load dictionary from the specified in-memory definitions with a default symbol space. | |
int | LoadDictionary (const ConstDictionaryRecord *DictionaryData, SymbolSpacePtr DefaultSymbolSpace, bool FastFail) |
Load dictionary from the specified in-memory definitions with a default symbol space. | |
int | LoadDictionary (const char *DictFile, SymbolSpacePtr DefaultSymbolSpace, bool FastFail) |
Load dictionary from the specified XML definitions with a default symbol space. | |
void | DictLoad_startElement (void *user_data, const char *name, const char **attrs) |
XML callback - Deal with start tag of an element. | |
bool | ProcessClassElement (void *user_data, const char *name, const char **attrs) |
Process an XML element that has been determined to be part of a class definition. | |
void | DictLoad_endElement (void *user_data, const char *name) |
XML callback - Deal with end tag of an element. | |
Variables | |
bool | LoadBuiltInTraits = true |
Set when built-in traits need to be loaded. | |
XMLParserHandler | DefTypes_XMLHandler |
Our XML handler. | |
static bool | BasicClassesDefined = false |
Set true once the basic required classes have been loaded. | |
static XMLParserHandler | DictLoad_XMLHandler |
Our XML handler. | |
static UInt8 | BitCount [256] |
typedef ConstClassRecord const* ConstClassRecordPTR [static] |
enum DictCurrentState |
enum TypesCurrentState |
State-machine state for XML parsing.
void @15::DefineTraits | ( | void | ) | [static] |
Build the map of all known traits.
void @15::DefTypes_endElement | ( | void * | user_data, | |
const char * | name | |||
) | [static] |
XML callback - Deal with end tag of an element.
void @15::DefTypes_endElement | ( | void * | user_data, | |
const char * | name | |||
) | [static] |
void @15::DefTypes_startElement | ( | void * | user_data, | |
const char * | name, | |||
const char ** | attrs | |||
) | [static] |
XML callback - Deal with start tag of an element.
void @15::DefTypes_startElement | ( | void * | user_data, | |
const char * | name, | |||
const char ** | attrs | |||
) | [static] |
XML parsing functions for defining types.
void @15::DictLoad_endElement | ( | void * | user_data, | |
const char * | name | |||
) | [static] |
XML callback - Deal with end tag of an element.
void @15::DictLoad_endElement | ( | void * | user_data, | |
const char * | name | |||
) | [static] |
void @15::DictLoad_startElement | ( | void * | user_data, | |
const char * | name, | |||
const char ** | attrs | |||
) | [static] |
XML callback - Deal with start tag of an element.
void @15::DictLoad_startElement | ( | void * | user_data, | |
const char * | name, | |||
const char ** | attrs | |||
) | [static] |
XML parsing functions for dictionary loading.
ClassRecordPtr @15::LoadClassesSub | ( | ConstClassRecordPTR & | ClassData, | |
SymbolSpacePtr | DefaultSymbolSpace | |||
) | [static] |
File local function to build class list from the specified in-memory definitions.
This function is called by LoadClasses() and is recursive DRAGONS: ClassData is changed by LoadClassesSub - at return it points to the next peer entry
bool @15::ProcessClassElement | ( | void * | user_data, | |
const char * | name, | |||
const char ** | attrs | |||
) | [static] |
Process an XML element that has been determined to be part of a class definition.
bool @15::ProcessClassElement | ( | void * | user_data, | |
const char * | name, | |||
const char ** | attrs | |||
) | [static] |
Process an XML element that has been determined to be part of a class definition.
int @15::ReadHexStringOrUL | ( | const char * | Source, | |
int | Max, | |||
UInt8 * | Dest, | |||
const char * | Sep | |||
) | [static] |
Read hex values separated by any of 'Sep', if it is a urn read any of the supported formats via StringToUL.
void @15::XML_error | ( | void * | user_data, | |
const char * | msg, | |||
... | ||||
) | [static] |
XML callback - Handle errors during XML parsing.
void @15::XML_fatalError | ( | void * | user_data, | |
const char * | msg, | |||
... | ||||
) | [static] |
XML callback - Handle fatal errors during XML parsing.
void @15::XML_warning | ( | void * | user_data, | |
const char * | msg, | |||
... | ||||
) | [static] |
XML callback - Handle warnings during XML parsing.
bool BasicClassesDefined = false [static] |
Set true once the basic required classes have been loaded.
Initial value:
{ 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8 }
ClassRecordList ClassesToBuild |
Top level classes that need to be built at the end of the parsing.
ClassRecordList ClassList |
Class being built at this level (one for each level in the hierarchy).
TypesParserState ClassState |
Parser state for types sub-parser.
Default symbol space to use for all classes (in current MXFClasses section).
Default symbol space to use for all types (in current MXFTypes section).
XMLParserHandler DefTypes_XMLHandler [static] |
Initial value:
{ (startElementXMLFunc) DefTypes_startElement, (endElementXMLFunc) DefTypes_endElement, (warningXMLFunc) XML_warning, (errorXMLFunc) XML_error, (fatalErrorXMLFunc) XML_fatalError, }
XMLParserHandler DictLoad_XMLHandler [static] |
Initial value:
{ (startElementXMLFunc) DictLoad_startElement, (endElementXMLFunc) DictLoad_endElement, (warningXMLFunc) XML_warning, (errorXMLFunc) XML_error, (fatalErrorXMLFunc) XML_fatalError, }
Default symbol space to use for all classes (in the whole dictionary).
bool LabelsOnly |
True if this is a labels section rather than a full types section.
bool LoadBuiltInTraits = true [static] |
Set when built-in traits need to be loaded.
The current compound or enum being built (or NULL).
Current state of the parser state-machine.
Current state of the parser state-machine.
TypeRecordList Types |
The types being built.