UFO: Alien Invasion
|
UFO:AI interface functions to mxml. More...
Go to the source code of this file.
Functions | |
void | XML_AddString (xmlNode_t *parent, const char *name, const char *value) |
add a String attribute to the XML Node More... | |
void | XML_AddStringValue (xmlNode_t *parent, const char *name, const char *value) |
add a non-empty String attribute to the XML Node More... | |
void | XML_AddBool (xmlNode_t *parent, const char *name, bool value) |
add a Boolean attribute to the XML Node More... | |
void | XML_AddBoolValue (xmlNode_t *parent, const char *name, bool value) |
add a non-false Boolean attribute to the XML Node More... | |
void | XML_AddFloat (xmlNode_t *parent, const char *name, float value) |
add a Float attribute to the XML Node More... | |
void | XML_AddFloatValue (xmlNode_t *parent, const char *name, float value) |
add a non-zero Float attribute to the XML Node More... | |
void | XML_AddDouble (xmlNode_t *parent, const char *name, double value) |
add a Double attribute to the XML Node More... | |
void | XML_AddDoubleValue (xmlNode_t *parent, const char *name, double value) |
add a non-zero Double attribute to the XML Node More... | |
void | XML_AddByte (xmlNode_t *parent, const char *name, byte value) |
add a Byte attribute to the XML Node More... | |
void | XML_AddByteValue (xmlNode_t *parent, const char *name, byte value) |
add a non-zero Byte attribute to the XML Node More... | |
void | XML_AddShort (xmlNode_t *parent, const char *name, short value) |
add a Short attribute to the XML Node More... | |
void | XML_AddShortValue (xmlNode_t *parent, const char *name, short value) |
add a non-zero Short attribute to the XML Node More... | |
void | XML_AddInt (xmlNode_t *parent, const char *name, int value) |
add an Int attribute to the XML Node More... | |
void | XML_AddIntValue (xmlNode_t *parent, const char *name, int value) |
add a non-zero Int attribute to the XML Node More... | |
void | XML_AddLong (xmlNode_t *parent, const char *name, long value) |
add a Long attribute to the XML Node More... | |
void | XML_AddLongValue (xmlNode_t *parent, const char *name, long value) |
add a non-zero Long attribute to the XML Node More... | |
void | XML_AddPos3 (xmlNode_t *parent, const char *name, const vec3_t pos) |
add a Pos3 data to the XML Tree More... | |
void | XML_AddPos2 (xmlNode_t *parent, const char *name, const vec2_t pos) |
add a Pos2 data to the XML Tree More... | |
void | XML_AddDate (xmlNode_t *parent, const char *name, const int day, const int sec) |
add a date data to the XML Tree More... | |
xmlNode_t * | XML_AddNode (xmlNode_t *parent, const char *name) |
add a new node to the XML tree More... | |
bool | XML_GetBool (xmlNode_t *parent, const char *name, const bool defaultval) |
retrieve a Boolean attribute from an XML Node More... | |
int | XML_GetInt (xmlNode_t *parent, const char *name, const int defaultval) |
retrieve an Int attribute from an XML Node More... | |
short | XML_GetShort (xmlNode_t *parent, const char *name, const short defaultval) |
retrieve a Short attribute from an XML Node More... | |
long | XML_GetLong (xmlNode_t *parent, const char *name, const long defaultval) |
retrieve a Long attribute from an XML Node More... | |
const char * | XML_GetString (xmlNode_t *parent, const char *name) |
retrieve a String attribute from an XML Node More... | |
float | XML_GetFloat (xmlNode_t *parent, const char *name, const float defaultval) |
retrieve a Float attribute from an XML Node More... | |
double | XML_GetDouble (xmlNode_t *parent, const char *name, const double defaultval) |
retrieve a Double attribute from an XML Node More... | |
xmlNode_t * | XML_GetPos2 (xmlNode_t *parent, const char *name, vec2_t pos) |
retrieve the first Pos2 data from an XML Node More... | |
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 More... | |
xmlNode_t * | XML_GetPos3 (xmlNode_t *parent, const char *name, vec3_t pos) |
retrieve the first Pos3 data from an XML Node More... | |
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 More... | |
xmlNode_t * | XML_GetDate (xmlNode_t *parent, const char *name, int *day, int *sec) |
retrieve the date data from an XML Node More... | |
xmlNode_t * | XML_GetNode (xmlNode_t *parent, const char *name) |
Get first Node of the XML tree by name. More... | |
xmlNode_t * | XML_GetNextNode (xmlNode_t *current, xmlNode_t *parent, const char *name) |
Get next Node of the XML tree by name. More... | |
static mxml_type_t | mxml_ufo_type_cb (xmlNode_t *node) |
callback function for parsing the node tree More... | |
xmlNode_t * | XML_Parse (const char *buffer) |
UFO:AI interface functions to mxml.
Definition in file xml.cpp.
|
static |
callback function for parsing the node tree
Definition at line 507 of file xml.cpp.
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 62 of file xml.cpp.
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 74 of file xml.cpp.
References XML_AddBool().
Referenced by GAME_GetImportData().
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 137 of file xml.cpp.
References XML_AddLong().
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 149 of file xml.cpp.
References XML_AddLongValue().
Referenced by GAME_GetImportData().
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 264 of file xml.cpp.
References 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 110 of file xml.cpp.
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 124 of file xml.cpp.
References XML_AddDouble().
Referenced by GAME_GetImportData(), 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 87 of file xml.cpp.
References XML_AddDouble().
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 99 of file xml.cpp.
References XML_AddDoubleValue().
Referenced by GAME_GetImportData().
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 183 of file xml.cpp.
References XML_AddLong().
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 195 of file xml.cpp.
References XML_AddLongValue().
Referenced by GAME_GetImportData(), GAME_SaveCharacter(), GAME_SaveItem(), and GAME_SaveTeam().
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 206 of file xml.cpp.
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 220 of file xml.cpp.
References XML_AddLong().
Referenced by GAME_GetImportData(), 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 277 of file xml.cpp.
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 249 of file xml.cpp.
References 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 234 of file xml.cpp.
References 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 160 of file xml.cpp.
References XML_AddLong().
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 172 of file xml.cpp.
References XML_AddLongValue().
Referenced by GAME_GetImportData().
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 36 of file xml.cpp.
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 49 of file xml.cpp.
References Q_strnull(), and XML_AddString().
Referenced by GAME_GetImportData().
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 288 of file xml.cpp.
References Q_streq.
Referenced by 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 471 of file xml.cpp.
References 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 378 of file xml.cpp.
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 364 of file xml.cpp.
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 308 of file xml.cpp.
Referenced by GAME_GetImportData(), GAME_LoadCharacter(), GAME_LoadItem(), GAME_LoadTeam(), and XML_GetDate().
retrieve a Long 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 336 of file xml.cpp.
Referenced by GAME_GetImportData().
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 499 of file xml.cpp.
Referenced by 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 413 of file xml.cpp.
References 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 451 of file xml.cpp.
References 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 487 of file xml.cpp.
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 394 of file xml.cpp.
References 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 431 of file xml.cpp.
References 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 322 of file xml.cpp.
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 350 of file xml.cpp.
Referenced by GAME_GetImportData(), GAME_LoadCharacter(), GAME_LoadItem(), and GAME_LoadTeam().
xmlNode_t* XML_Parse | ( | const char * | buffer | ) |
Definition at line 531 of file xml.cpp.
References mxml_ufo_type_cb().
Referenced by GAME_GetImportData(), and GAME_LoadTeam().