|
UFO: Alien Invasion
|
UFO:AI interface functions to mxml. More...

Go to the source code of this file.
Macros | |
| #define | MXML_DESCEND_NONE MXML_NO_DESCEND |
| #define | MXML_TYPE_INTEGER MXML_INTEGER |
| #define | MXML_TYPE_OPAQUE MXML_OPAQUE |
| #define | MXML_TYPE_REAL MXML_REAL |
| #define | MXML_TYPE_TEXT MXML_TEXT |
Functions | |
| void | XML_AddString (xmlNode_t *parent, const char *name, const char *value) |
| add a String attribute to the XML Node | |
| void | XML_AddStringValue (xmlNode_t *parent, const char *name, const char *value) |
| add a non-empty String attribute to the XML Node | |
| void | XML_AddBool (xmlNode_t *parent, const char *name, bool value) |
| add a Boolean attribute to the XML Node | |
| void | XML_AddBoolValue (xmlNode_t *parent, const char *name, bool value) |
| add a non-false Boolean attribute to the XML Node | |
| void | XML_AddFloat (xmlNode_t *parent, const char *name, float value) |
| add a Float attribute to the XML Node | |
| void | XML_AddFloatValue (xmlNode_t *parent, const char *name, float value) |
| add a non-zero Float attribute to the XML Node | |
| void | XML_AddDouble (xmlNode_t *parent, const char *name, double value) |
| add a Double attribute to the XML Node | |
| void | XML_AddDoubleValue (xmlNode_t *parent, const char *name, double value) |
| add a non-zero Double attribute to the XML Node | |
| void | XML_AddByte (xmlNode_t *parent, const char *name, byte value) |
| add a Byte attribute to the XML Node | |
| void | XML_AddByteValue (xmlNode_t *parent, const char *name, byte value) |
| add a non-zero Byte attribute to the XML Node | |
| void | XML_AddShort (xmlNode_t *parent, const char *name, short value) |
| add a Short attribute to the XML Node | |
| void | XML_AddShortValue (xmlNode_t *parent, const char *name, short value) |
| add a non-zero Short attribute to the XML Node | |
| void | XML_AddInt (xmlNode_t *parent, const char *name, int value) |
| add an Int attribute to the XML Node | |
| void | XML_AddIntValue (xmlNode_t *parent, const char *name, int value) |
| add a non-zero Int attribute to the XML Node | |
| void | XML_AddLong (xmlNode_t *parent, const char *name, long value) |
| add a Long attribute to the XML Node | |
| void | XML_AddLongValue (xmlNode_t *parent, const char *name, long value) |
| add a non-zero Long attribute to the XML Node | |
| void | XML_AddPos3 (xmlNode_t *parent, const char *name, const vec3_t pos) |
| add a Pos3 data to the XML Tree | |
| void | XML_AddPos2 (xmlNode_t *parent, const char *name, const vec2_t pos) |
| add a Pos2 data to the XML Tree | |
| void | XML_AddDate (xmlNode_t *parent, const char *name, const int day, const int sec) |
| add a date data to the XML Tree | |
| xmlNode_t * | XML_AddNode (xmlNode_t *parent, const char *name) |
| add a new node to the XML tree | |
| bool | XML_GetBool (xmlNode_t *parent, const char *name, const bool defaultval) |
| retrieve a Boolean attribute from an XML Node | |
| int | XML_GetInt (xmlNode_t *parent, const char *name, const int defaultval) |
| retrieve an Int attribute from an XML Node | |
| short | XML_GetShort (xmlNode_t *parent, const char *name, const short defaultval) |
| retrieve a Short attribute from an XML Node | |
| long | XML_GetLong (xmlNode_t *parent, const char *name, const long defaultval) |
| retrieve a Long attribute from an XML Node | |
| const char * | XML_GetString (xmlNode_t *parent, const char *name) |
| retrieve a String attribute from an XML Node | |
| float | XML_GetFloat (xmlNode_t *parent, const char *name, const float defaultval) |
| retrieve a Float attribute from an XML Node | |
| double | XML_GetDouble (xmlNode_t *parent, const char *name, const double defaultval) |
| retrieve a Double attribute from an XML Node | |
| xmlNode_t * | XML_GetPos2 (xmlNode_t *parent, const char *name, vec2_t pos) |
| retrieve the first Pos2 data from an XML Node | |
| xmlNode_t * | XML_GetNextPos2 (xmlNode_t *actual, xmlNode_t *parent, const char *name, vec2_t pos) |
| retrieve the next Pos2 data from an XML Node | |
| xmlNode_t * | XML_GetPos3 (xmlNode_t *parent, const char *name, vec3_t pos) |
| retrieve the first Pos3 data from an XML Node | |
| xmlNode_t * | XML_GetNextPos3 (xmlNode_t *actual, xmlNode_t *parent, const char *name, vec3_t pos) |
| retrieve the next Pos3 data from an XML Node | |
| xmlNode_t * | XML_GetDate (xmlNode_t *parent, const char *name, int *day, int *sec) |
| retrieve the date data from an XML Node | |
| xmlNode_t * | XML_GetNode (xmlNode_t *parent, const char *name) |
| Get first Node of the XML tree by name. | |
| xmlNode_t * | XML_GetNextNode (xmlNode_t *current, xmlNode_t *parent, const char *name) |
| Get next Node of the XML tree by name. | |
| static mxml_type_t | mxml_ufo_type_cb (xmlNode_t *node) |
| callback function for parsing the node tree | |
| xmlNode_t * | XML_Parse (const char *buffer) |
UFO:AI interface functions to mxml.
Definition in file xml.cpp.
| #define MXML_DESCEND_NONE MXML_NO_DESCEND |
Definition at line 31 of file xml.cpp.
Referenced by XML_GetNextNode().
| #define MXML_TYPE_INTEGER MXML_INTEGER |
Definition at line 32 of file xml.cpp.
Referenced by mxml_ufo_type_cb().
| #define MXML_TYPE_OPAQUE MXML_OPAQUE |
Definition at line 33 of file xml.cpp.
Referenced by mxml_ufo_type_cb().
| #define MXML_TYPE_REAL MXML_REAL |
Definition at line 34 of file xml.cpp.
Referenced by mxml_ufo_type_cb().
| #define MXML_TYPE_TEXT MXML_TEXT |
Definition at line 35 of file xml.cpp.
Referenced by mxml_ufo_type_cb().
|
static |
callback function for parsing the node tree
Definition at line 517 of file xml.cpp.
References MXML_TYPE_INTEGER, MXML_TYPE_OPAQUE, MXML_TYPE_REAL, MXML_TYPE_TEXT, Q_streq, type, and xmlNode_t.
Referenced by XML_Parse().
add a Boolean attribute to the XML Node
| [out] | parent | XML Node structure to add to |
| [in] | name | Name of the attribute |
| [in] | value | Value of the attribute |
Definition at line 71 of file xml.cpp.
References name, and xmlNode_t.
Referenced by GAME_GetImportData(), and XML_AddBoolValue().
add a non-false Boolean attribute to the XML Node
| [out] | parent | XML Node structure to add to |
| [in] | name | Name of the attribute |
| [in] | value | Value of the attribute |
Definition at line 83 of file xml.cpp.
References name, XML_AddBool(), and xmlNode_t.
Referenced by GAME_GetImportData(), and cgame_import_t::void().
add a Byte attribute to the XML Node
| [out] | parent | XML Node structure to add to |
| [in] | name | Name of the attribute |
| [in] | value | Value of the attribute |
Definition at line 146 of file xml.cpp.
References name, XML_AddLong(), and xmlNode_t.
Referenced by GAME_GetImportData().
add a non-zero Byte attribute to the XML Node
| [out] | parent | XML Node structure to add to |
| [in] | name | Name of the attribute |
| [in] | value | Value of the attribute |
Definition at line 158 of file xml.cpp.
References name, XML_AddLongValue(), and xmlNode_t.
Referenced by GAME_GetImportData(), and cgame_import_t::void().
add a date data to the XML Tree
| [out] | parent | XML Node structure to add to |
| [in] | name | Name of the node to add |
| [in] | day | Day part of the date |
| [in] | sec | Second part of the date |
Definition at line 273 of file xml.cpp.
References name, XML_AddInt(), and xmlNode_t.
Referenced by GAME_GetImportData().
add a Double attribute to the XML Node
| [out] | parent | XML Node structure to add to |
| [in] | name | Name of the attribute |
| [in] | value | Value of the attribute |
Definition at line 119 of file xml.cpp.
References name, and xmlNode_t.
Referenced by GAME_GetImportData(), XML_AddDoubleValue(), and XML_AddFloat().
add a non-zero Double attribute to the XML Node
| [out] | parent | XML Node structure to add to |
| [in] | name | Name of the attribute |
| [in] | value | Value of the attribute |
Definition at line 133 of file xml.cpp.
References name, XML_AddDouble(), and xmlNode_t.
Referenced by GAME_GetImportData(), cgame_import_t::void(), and XML_AddFloatValue().
add a Float attribute to the XML Node
| [out] | parent | XML Node structure to add to |
| [in] | name | Name of the attribute |
| [in] | value | Value of the attribute |
Definition at line 96 of file xml.cpp.
References name, XML_AddDouble(), and xmlNode_t.
Referenced by GAME_GetImportData(), XML_AddPos2(), and XML_AddPos3().
add a non-zero Float attribute to the XML Node
| [out] | parent | XML Node structure to add to |
| [in] | name | Name of the attribute |
| [in] | value | Value of the attribute |
Definition at line 108 of file xml.cpp.
References name, XML_AddDoubleValue(), and xmlNode_t.
Referenced by GAME_GetImportData(), and cgame_import_t::void().
add an Int attribute to the XML Node
| [out] | parent | XML Node structure to add to |
| [in] | name | Name of the attribute |
| [in] | value | Value of the attribute |
Definition at line 192 of file xml.cpp.
References name, XML_AddLong(), and xmlNode_t.
Referenced by GAME_GetImportData(), GAME_SaveCharacter(), GAME_SaveItem(), and XML_AddDate().
add a non-zero Int attribute to the XML Node
| [out] | parent | XML Node structure to add to |
| [in] | name | Name of the attribute |
| [in] | value | Value of the attribute |
Definition at line 204 of file xml.cpp.
References name, XML_AddLongValue(), and xmlNode_t.
Referenced by GAME_GetImportData(), GAME_SaveCharacter(), GAME_SaveItem(), GAME_SaveTeam(), and cgame_import_t::void().
add a Long attribute to the XML Node
| [out] | parent | XML Node structure to add to |
| [in] | name | Name of the attribute |
| [in] | value | Value of the attribute |
Definition at line 215 of file xml.cpp.
References name, and xmlNode_t.
Referenced by GAME_GetImportData(), XML_AddByte(), XML_AddInt(), XML_AddLongValue(), and XML_AddShort().
add a non-zero Long attribute to the XML Node
| [out] | parent | XML Node structure to add to |
| [in] | name | Name of the attribute |
| [in] | value | Value of the attribute |
Definition at line 229 of file xml.cpp.
References name, XML_AddLong(), and xmlNode_t.
Referenced by GAME_GetImportData(), cgame_import_t::void(), XML_AddByteValue(), XML_AddIntValue(), and XML_AddShortValue().
add a new node to the XML tree
| [out] | parent | XML Node structure to add to |
| [in] | name | Name of the new node return pointer to the new XML Node structure |
Definition at line 286 of file xml.cpp.
References name, and xmlNode_t.
Referenced by GAME_GetImportData(), GAME_SaveCharacter(), GAME_SaveInventory(), GAME_SaveTeam(), and GAME_SaveTeamInfo().
add a Pos2 data to the XML Tree
| [out] | parent | XML Node structure to add to |
| [in] | name | Name of the node to add |
| [in] | pos | Pos2 structure with position data |
Definition at line 258 of file xml.cpp.
References name, XML_AddFloat(), and xmlNode_t.
Referenced by GAME_GetImportData().
add a Pos3 data to the XML Tree
| [out] | parent | XML Node structure to add to |
| [in] | name | Name of the node to add |
| [in] | pos | Pos3 structure with position data |
Definition at line 243 of file xml.cpp.
References name, XML_AddFloat(), and xmlNode_t.
Referenced by GAME_GetImportData().
add a Short attribute to the XML Node
| [out] | parent | XML Node structure to add to |
| [in] | name | Name of the attribute |
| [in] | value | Value of the attribute |
Definition at line 169 of file xml.cpp.
References name, XML_AddLong(), and xmlNode_t.
Referenced by GAME_GetImportData().
add a non-zero Short attribute to the XML Node
| [out] | parent | XML Node structure to add to |
| [in] | name | Name of the attribute |
| [in] | value | Value of the attribute |
Definition at line 181 of file xml.cpp.
References name, XML_AddLongValue(), and xmlNode_t.
Referenced by GAME_GetImportData(), and cgame_import_t::void().
add a String attribute to the XML Node
| [out] | parent | XML Node structure to add to |
| [in] | name | Name of the attribute |
| [in] | value | Value of the attribute |
Definition at line 45 of file xml.cpp.
References name, and xmlNode_t.
Referenced by GAME_GetImportData(), GAME_SaveCharacter(), GAME_SaveItem(), GAME_SaveTeam(), and XML_AddStringValue().
add a non-empty String attribute to the XML Node
| [out] | parent | XML Node structure to add to |
| [in] | name | Name of the attribute |
| [in] | value | Value of the attribute |
Definition at line 58 of file xml.cpp.
References name, Q_strnull(), XML_AddString(), and xmlNode_t.
Referenced by GAME_GetImportData(), and cgame_import_t::void().
| bool XML_GetBool | ( | xmlNode_t * | parent, |
| const char * | name, | ||
| const bool | defaultval ) |
retrieve a Boolean attribute from an XML Node
| [in] | parent | XML Node structure to get from |
| [in] | name | Name of the attribute |
| [in] | defaultval | Default value to return if no such attribute defined |
Definition at line 297 of file xml.cpp.
References name, Q_streq, and xmlNode_t.
Referenced by cgame_import_t::bool(), and GAME_GetImportData().
retrieve the date data from an XML Node
| [in] | parent | XML Node structure to get child from |
| [in] | name | Name of the pos node |
| [out] | day | Day part of the date to fill |
| [out] | sec | Second part of the date to fill |
Definition at line 480 of file xml.cpp.
References name, XML_GetInt(), XML_GetNode(), and xmlNode_t.
Referenced by GAME_GetImportData().
| double XML_GetDouble | ( | xmlNode_t * | parent, |
| const char * | name, | ||
| const double | defaultval ) |
retrieve a Double attribute from an XML Node
| [in] | parent | XML Node structure to get from |
| [in] | name | Name of the attribute |
| [in] | defaultval | Default value to return if no such attribute defined |
Definition at line 387 of file xml.cpp.
References name, and xmlNode_t.
Referenced by GAME_GetImportData().
| float XML_GetFloat | ( | xmlNode_t * | parent, |
| const char * | name, | ||
| const float | defaultval ) |
retrieve a Float attribute from an XML Node
| [in] | parent | XML Node structure to get from |
| [in] | name | Name of the attribute |
| [in] | defaultval | Default value to return if no such attribute defined |
Definition at line 373 of file xml.cpp.
References name, and xmlNode_t.
Referenced by GAME_GetImportData(), XML_GetNextPos2(), XML_GetNextPos3(), XML_GetPos2(), and XML_GetPos3().
retrieve an Int attribute from an XML Node
| [in] | parent | XML Node structure to get from |
| [in] | name | Name of the attribute |
| [in] | defaultval | Default value to return if no such attribute defined |
Definition at line 317 of file xml.cpp.
References name, and xmlNode_t.
Referenced by GAME_GetImportData(), GAME_LoadCharacter(), GAME_LoadItem(), GAME_LoadTeam(), and XML_GetDate().
Get next Node of the XML tree by name.
| [in] | current | Pointer to the previous Node was found |
| [in] | parent | Parent XML Node structure |
| [in] | name | Name of the node to retrieve |
Definition at line 508 of file xml.cpp.
References MXML_DESCEND_NONE, name, and xmlNode_t.
Referenced by AIR_LoadAircraftSlotsXML(), B_LoadBaseSlotsXML(), GAME_GetImportData(), GAME_LoadCharacter(), GAME_LoadInventory(), GAME_LoadTeam(), GAME_LoadTeamInfo(), XML_GetNextPos2(), and XML_GetNextPos3().
| xmlNode_t * XML_GetNextPos2 | ( | xmlNode_t * | actual, |
| xmlNode_t * | parent, | ||
| const char * | name, | ||
| vec2_t | pos ) |
retrieve the next Pos2 data from an XML Node
| [in] | actual | XML Node pointer of the previous pos data |
| [in] | parent | XML Node structure to get child from |
| [in] | name | Name of the pos node |
| [out] | pos | vec2_t structure to fill |
Definition at line 422 of file xml.cpp.
References name, XML_GetFloat(), XML_GetNextNode(), and xmlNode_t.
Referenced by GAME_GetImportData().
| xmlNode_t * XML_GetNextPos3 | ( | xmlNode_t * | actual, |
| xmlNode_t * | parent, | ||
| const char * | name, | ||
| vec3_t | pos ) |
retrieve the next Pos3 data from an XML Node
| [in] | actual | XML Node pointer of the previous pos data |
| [in] | parent | XML Node structure to get child from |
| [in] | name | Name of the pos node |
| [out] | pos | vec3_t structure to fill |
Definition at line 460 of file xml.cpp.
References name, XML_GetFloat(), XML_GetNextNode(), and xmlNode_t.
Referenced by GAME_GetImportData().
Get first Node of the XML tree by name.
| [in] | parent | Parent XML Node structure |
| [in] | name | Name of the node to retrieve |
Definition at line 496 of file xml.cpp.
References name, and xmlNode_t.
Referenced by GAME_GetImportData(), GAME_LoadCharacter(), GAME_LoadInventory(), GAME_LoadTeam(), GAME_LoadTeamInfo(), XML_GetDate(), XML_GetPos2(), and XML_GetPos3().
retrieve the first Pos2 data from an XML Node
| [in] | parent | XML Node structure to get child from |
| [in] | name | Name of the pos node |
| [out] | pos | vec2_t structure to fill |
Definition at line 403 of file xml.cpp.
References name, XML_GetFloat(), XML_GetNode(), and xmlNode_t.
Referenced by GAME_GetImportData().
retrieve the first Pos3 data from an XML Node
| [in] | parent | XML Node structure to get child from |
| [in] | name | Name of the pos node |
| [out] | pos | vec3_t structure to fill |
Definition at line 440 of file xml.cpp.
References name, XML_GetFloat(), XML_GetNode(), and xmlNode_t.
Referenced by GAME_GetImportData().
| short XML_GetShort | ( | xmlNode_t * | parent, |
| const char * | name, | ||
| const short | defaultval ) |
retrieve a Short attribute from an XML Node
| [in] | parent | XML Node structure to get from |
| [in] | name | Name of the attribute |
| [in] | defaultval | Default value to return if no such attribute defined |
Definition at line 331 of file xml.cpp.
References name, and xmlNode_t.
Referenced by GAME_GetImportData().
| const char * XML_GetString | ( | xmlNode_t * | parent, |
| const char * | name ) |
retrieve a String attribute from an XML Node
| [in] | parent | XML Node structure to get from |
| [in] | name | Name of the attribute |
Definition at line 359 of file xml.cpp.
References name, and xmlNode_t.
Referenced by GAME_GetImportData(), GAME_LoadCharacter(), GAME_LoadItem(), and GAME_LoadTeam().
| xmlNode_t * XML_Parse | ( | const char * | buffer | ) |
Definition at line 544 of file xml.cpp.
References mxml_ufo_type_cb(), and xmlNode_t.
Referenced by GAME_GetImportData(), and GAME_LoadTeam().