Public Types | |
enum | ElementClosingType { OPEN , CLOSED , CLOSING } |
Public Member Functions | |
const char * | Name () const |
Get the name of an element(which is the Value() of the node.) More... | |
void | SetName (const char *str, bool staticMem=false) |
Set the name of the element. More... | |
virtual XMLElement * | ToElement () |
Safely cast to an Element, or null. More... | |
virtual const XMLElement * | ToElement () const |
virtual bool | Accept (XMLVisitor *visitor) const |
const char * | Attribute (const char *name, const char *value=nullptr) const |
int | IntAttribute (const char *name, int defaultValue=0) const |
unsigned | UnsignedAttribute (const char *name, unsigned defaultValue=0) const |
See IntAttribute() More... | |
int64_t | Int64Attribute (const char *name, int64_t defaultValue=0) const |
See IntAttribute() More... | |
bool | BoolAttribute (const char *name, bool defaultValue=false) const |
See IntAttribute() More... | |
double | DoubleAttribute (const char *name, double defaultValue=0) const |
See IntAttribute() More... | |
float | FloatAttribute (const char *name, float defaultValue=0) const |
See IntAttribute() More... | |
XMLError | QueryIntAttribute (const char *name, int *value) const |
XMLError | QueryUnsignedAttribute (const char *name, unsigned int *value) const |
See QueryIntAttribute() More... | |
XMLError | QueryInt64Attribute (const char *name, int64_t *value) const |
See QueryIntAttribute() More... | |
XMLError | QueryBoolAttribute (const char *name, bool *value) const |
See QueryIntAttribute() More... | |
XMLError | QueryDoubleAttribute (const char *name, double *value) const |
See QueryIntAttribute() More... | |
XMLError | QueryFloatAttribute (const char *name, float *value) const |
See QueryIntAttribute() More... | |
XMLError | QueryStringAttribute (const char *name, const char **value) const |
See QueryIntAttribute() More... | |
int | QueryAttribute (const char *name, int *value) const |
int | QueryAttribute (const char *name, unsigned int *value) const |
int | QueryAttribute (const char *name, int64_t *value) const |
int | QueryAttribute (const char *name, bool *value) const |
int | QueryAttribute (const char *name, double *value) const |
int | QueryAttribute (const char *name, float *value) const |
void | SetAttribute (const char *name, const char *value) |
Sets the named attribute to value. More... | |
void | SetAttribute (const char *name, int value) |
Sets the named attribute to value. More... | |
void | SetAttribute (const char *name, unsigned value) |
Sets the named attribute to value. More... | |
void | SetAttribute (const char *name, int64_t value) |
Sets the named attribute to value. More... | |
void | SetAttribute (const char *name, bool value) |
Sets the named attribute to value. More... | |
void | SetAttribute (const char *name, double value) |
Sets the named attribute to value. More... | |
void | SetAttribute (const char *name, float value) |
Sets the named attribute to value. More... | |
void | DeleteAttribute (const char *name) |
const XMLAttribute * | FirstAttribute () const |
Return the first attribute in the list. More... | |
const XMLAttribute * | FindAttribute (const char *name) const |
Query a specific attribute in the list. More... | |
const char * | GetText () const |
void | SetText (const char *inText) |
void | SetText (int value) |
Convenience method for setting text inside an element. See SetText() for important limitations. More... | |
void | SetText (unsigned value) |
Convenience method for setting text inside an element. See SetText() for important limitations. More... | |
void | SetText (int64_t value) |
Convenience method for setting text inside an element. See SetText() for important limitations. More... | |
void | SetText (bool value) |
Convenience method for setting text inside an element. See SetText() for important limitations. More... | |
void | SetText (double value) |
Convenience method for setting text inside an element. See SetText() for important limitations. More... | |
void | SetText (float value) |
Convenience method for setting text inside an element. See SetText() for important limitations. More... | |
XMLError | QueryIntText (int *ival) const |
XMLError | QueryUnsignedText (unsigned *uval) const |
See QueryIntText() More... | |
XMLError | QueryInt64Text (int64_t *uval) const |
See QueryIntText() More... | |
XMLError | QueryBoolText (bool *bval) const |
See QueryIntText() More... | |
XMLError | QueryDoubleText (double *dval) const |
See QueryIntText() More... | |
XMLError | QueryFloatText (float *fval) const |
See QueryIntText() More... | |
int | IntText (int defaultValue=0) const |
unsigned | UnsignedText (unsigned defaultValue=0) const |
See QueryIntText() More... | |
int64_t | Int64Text (int64_t defaultValue=0) const |
See QueryIntText() More... | |
bool | BoolText (bool defaultValue=false) const |
See QueryIntText() More... | |
double | DoubleText (double defaultValue=0) const |
See QueryIntText() More... | |
float | FloatText (float defaultValue=0) const |
See QueryIntText() More... | |
ElementClosingType | ClosingType () const |
virtual XMLNode * | ShallowClone (XMLDocument *document) const |
virtual bool | ShallowEqual (const XMLNode *compare) const |
Public Member Functions inherited from XMLNode | |
const XMLDocument * | GetDocument () const |
Get the XMLDocument that owns this XMLNode. More... | |
XMLDocument * | GetDocument () |
Get the XMLDocument that owns this XMLNode. More... | |
virtual XMLText * | ToText () |
Safely cast to Text, or null. More... | |
virtual XMLComment * | ToComment () |
Safely cast to a Comment, or null. More... | |
virtual XMLDocument * | ToDocument () |
Safely cast to a Document, or null. More... | |
virtual XMLDeclaration * | ToDeclaration () |
Safely cast to a Declaration, or null. More... | |
virtual XMLUnknown * | ToUnknown () |
Safely cast to an Unknown, or null. More... | |
virtual const XMLText * | ToText () const |
virtual const XMLComment * | ToComment () const |
virtual const XMLDocument * | ToDocument () const |
virtual const XMLDeclaration * | ToDeclaration () const |
virtual const XMLUnknown * | ToUnknown () const |
const char * | Value () const |
void | SetValue (const char *val, bool staticMem=false) |
int | GetLineNum () const |
Gets the line number the node is in, if the document was parsed from a file. More... | |
const XMLNode * | Parent () const |
Get the parent of this node on the DOM. More... | |
XMLNode * | Parent () |
bool | NoChildren () const |
Returns true if this node has no children. More... | |
const XMLNode * | FirstChild () const |
Get the first child node, or null if none exists. More... | |
XMLNode * | FirstChild () |
const XMLElement * | FirstChildElement (const char *name=nullptr) const |
XMLElement * | FirstChildElement (const char *name=nullptr) |
const XMLNode * | LastChild () const |
Get the last child node, or null if none exists. More... | |
XMLNode * | LastChild () |
const XMLElement * | LastChildElement (const char *name=nullptr) const |
XMLElement * | LastChildElement (const char *name=nullptr) |
const XMLNode * | PreviousSibling () const |
Get the previous(left) sibling node of this node. More... | |
XMLNode * | PreviousSibling () |
const XMLElement * | PreviousSiblingElement (const char *name=nullptr) const |
Get the previous(left) sibling element of this node, with an optionally supplied name. More... | |
XMLElement * | PreviousSiblingElement (const char *name=nullptr) |
const XMLNode * | NextSibling () const |
Get the next(right) sibling node of this node. More... | |
XMLNode * | NextSibling () |
const XMLElement * | NextSiblingElement (const char *name=nullptr) const |
Get the next(right) sibling element of this node, with an optionally supplied name. More... | |
XMLElement * | NextSiblingElement (const char *name=nullptr) |
XMLNode * | InsertEndChild (XMLNode *addThis) |
XMLNode * | LinkEndChild (XMLNode *addThis) |
XMLNode * | InsertFirstChild (XMLNode *addThis) |
XMLNode * | InsertAfterChild (XMLNode *afterThis, XMLNode *addThis) |
void | DeleteChildren () |
void | DeleteChild (XMLNode *node) |
XMLNode * | DeepClone (XMLDocument *target) const |
void | SetUserData (void *userData) |
void * | GetUserData () const |
Protected Member Functions | |
char * | ParseDeep (char *p, StrPair *parentEndTag, int *curLineNumPtr) |
Protected Member Functions inherited from XMLNode | |
XMLNode (XMLDocument *) | |
Private Types | |
enum | { BUF_SIZE = 200 } |
Private Member Functions | |
XMLElement (XMLDocument *doc) | |
XMLElement (const XMLElement &) | |
void | operator= (const XMLElement &) |
XMLAttribute * | FindAttribute (const char *name) |
XMLAttribute * | FindOrCreateAttribute (const char *name) |
char * | ParseAttributes (char *p, int *curLineNumPtr) |
XMLAttribute * | CreateAttribute () |
Static Private Member Functions | |
static void | DeleteAttribute (XMLAttribute *attribute) |
Private Attributes | |
ElementClosingType | _closingType |
XMLAttribute * | _rootAttribute |
Friends | |
class | XMLDocument |
Additional Inherited Members | |
Protected Attributes inherited from XMLNode | |
XMLDocument * | _document |
XMLNode * | _parent |
StrPair | _value |
int | _parseLineNum |
XMLNode * | _firstChild |
XMLNode * | _lastChild |
XMLNode * | _prev |
XMLNode * | _next |
void * | _userData |
Definition at line 1242 of file tinyxml2.h.
|
private |
Definition at line 1632 of file tinyxml2.h.
enum ElementClosingType |
Definition at line 1603 of file tinyxml2.h.
|
private |
Definition at line 1630 of file tinyxml2.cpp.
|
privatevirtual |
Definition at line 1637 of file tinyxml2.cpp.
|
virtual |
Implements XMLNode.
Definition at line 2145 of file tinyxml2.cpp.
const char * Attribute | ( | const char * | name, |
const char * | value = nullptr |
||
) | const |
Definition at line 1661 of file tinyxml2.cpp.
bool BoolAttribute | ( | const char * | name, |
bool | defaultValue = false |
||
) | const |
See IntAttribute()
Definition at line 1696 of file tinyxml2.cpp.
bool BoolText | ( | bool | defaultValue = false | ) | const |
See QueryIntText()
Definition at line 1897 of file tinyxml2.cpp.
|
inline |
Definition at line 1608 of file tinyxml2.h.
|
private |
Definition at line 2054 of file tinyxml2.cpp.
void DeleteAttribute | ( | const char * | name | ) |
Definition at line 1952 of file tinyxml2.cpp.
|
staticprivate |
Definition at line 2043 of file tinyxml2.cpp.
double DoubleAttribute | ( | const char * | name, |
double | defaultValue = 0 |
||
) | const |
See IntAttribute()
Definition at line 1703 of file tinyxml2.cpp.
double DoubleText | ( | double | defaultValue = 0 | ) | const |
See QueryIntText()
Definition at line 1904 of file tinyxml2.cpp.
|
inlineprivate |
Definition at line 1623 of file tinyxml2.h.
const XMLAttribute * FindAttribute | ( | const char * | name | ) | const |
Query a specific attribute in the list.
Definition at line 1648 of file tinyxml2.cpp.
|
private |
Definition at line 1919 of file tinyxml2.cpp.
|
inline |
Return the first attribute in the list.
Definition at line 1467 of file tinyxml2.h.
float FloatAttribute | ( | const char * | name, |
float | defaultValue = 0 |
||
) | const |
See IntAttribute()
Definition at line 1710 of file tinyxml2.cpp.
float FloatText | ( | float | defaultValue = 0 | ) | const |
See QueryIntText()
Definition at line 1911 of file tinyxml2.cpp.
const char * GetText | ( | ) | const |
Definition at line 1717 of file tinyxml2.cpp.
int64_t Int64Attribute | ( | const char * | name, |
int64_t | defaultValue = 0 |
||
) | const |
See IntAttribute()
Definition at line 1689 of file tinyxml2.cpp.
int64_t Int64Text | ( | int64_t | defaultValue = 0 | ) | const |
See QueryIntText()
Definition at line 1890 of file tinyxml2.cpp.
int IntAttribute | ( | const char * | name, |
int | defaultValue = 0 |
||
) | const |
Definition at line 1675 of file tinyxml2.cpp.
int IntText | ( | int | defaultValue = 0 | ) | const |
Definition at line 1876 of file tinyxml2.cpp.
|
inline |
Get the name of an element(which is the Value() of the node.)
Definition at line 1247 of file tinyxml2.h.
|
private |
Definition at line 1975 of file tinyxml2.cpp.
|
protectedvirtual |
Reimplemented from XMLNode.
Definition at line 2068 of file tinyxml2.cpp.
|
inline |
Definition at line 1411 of file tinyxml2.h.
|
inline |
Definition at line 1415 of file tinyxml2.h.
|
inline |
Definition at line 1419 of file tinyxml2.h.
|
inline |
Definition at line 1399 of file tinyxml2.h.
|
inline |
Definition at line 1407 of file tinyxml2.h.
|
inline |
Definition at line 1403 of file tinyxml2.h.
|
inline |
See QueryIntAttribute()
Definition at line 1346 of file tinyxml2.h.
XMLError QueryBoolText | ( | bool * | bval | ) | const |
See QueryIntText()
Definition at line 1832 of file tinyxml2.cpp.
|
inline |
See QueryIntAttribute()
Definition at line 1354 of file tinyxml2.h.
XMLError QueryDoubleText | ( | double * | dval | ) | const |
See QueryIntText()
Definition at line 1847 of file tinyxml2.cpp.
|
inline |
See QueryIntAttribute()
Definition at line 1362 of file tinyxml2.h.
XMLError QueryFloatText | ( | float * | fval | ) | const |
See QueryIntText()
Definition at line 1862 of file tinyxml2.cpp.
|
inline |
See QueryIntAttribute()
Definition at line 1337 of file tinyxml2.h.
XMLError QueryInt64Text | ( | int64_t * | uval | ) | const |
See QueryIntText()
Definition at line 1817 of file tinyxml2.cpp.
|
inline |
Definition at line 1319 of file tinyxml2.h.
XMLError QueryIntText | ( | int * | ival | ) | const |
Definition at line 1787 of file tinyxml2.cpp.
|
inline |
See QueryIntAttribute()
Definition at line 1371 of file tinyxml2.h.
|
inline |
See QueryIntAttribute()
Definition at line 1328 of file tinyxml2.h.
XMLError QueryUnsignedText | ( | unsigned * | uval | ) | const |
See QueryIntText()
Definition at line 1802 of file tinyxml2.cpp.
|
inline |
Sets the named attribute to value.
Definition at line 1446 of file tinyxml2.h.
|
inline |
Sets the named attribute to value.
Definition at line 1424 of file tinyxml2.h.
|
inline |
Sets the named attribute to value.
Definition at line 1451 of file tinyxml2.h.
|
inline |
Sets the named attribute to value.
Definition at line 1456 of file tinyxml2.h.
|
inline |
Sets the named attribute to value.
Definition at line 1429 of file tinyxml2.h.
|
inline |
Sets the named attribute to value.
Definition at line 1440 of file tinyxml2.h.
|
inline |
Sets the named attribute to value.
Definition at line 1434 of file tinyxml2.h.
|
inline |
Set the name of the element.
Definition at line 1251 of file tinyxml2.h.
void SetText | ( | bool | value | ) |
Convenience method for setting text inside an element. See SetText() for important limitations.
Definition at line 1763 of file tinyxml2.cpp.
void SetText | ( | const char * | inText | ) |
Definition at line 1727 of file tinyxml2.cpp.
void SetText | ( | double | value | ) |
Convenience method for setting text inside an element. See SetText() for important limitations.
Definition at line 1779 of file tinyxml2.cpp.
void SetText | ( | float | value | ) |
Convenience method for setting text inside an element. See SetText() for important limitations.
Definition at line 1771 of file tinyxml2.cpp.
void SetText | ( | int | value | ) |
Convenience method for setting text inside an element. See SetText() for important limitations.
Definition at line 1739 of file tinyxml2.cpp.
void SetText | ( | int64_t | value | ) |
Convenience method for setting text inside an element. See SetText() for important limitations.
Definition at line 1755 of file tinyxml2.cpp.
void SetText | ( | unsigned | value | ) |
Convenience method for setting text inside an element. See SetText() for important limitations.
Definition at line 1747 of file tinyxml2.cpp.
|
virtual |
Implements XMLNode.
Definition at line 2100 of file tinyxml2.cpp.
|
virtual |
Implements XMLNode.
Definition at line 2115 of file tinyxml2.cpp.
|
inlinevirtual |
Safely cast to an Element, or null.
Reimplemented from XMLNode.
Definition at line 1255 of file tinyxml2.h.
|
inlinevirtual |
Reimplemented from XMLNode.
Definition at line 1258 of file tinyxml2.h.
unsigned UnsignedAttribute | ( | const char * | name, |
unsigned | defaultValue = 0 |
||
) | const |
See IntAttribute()
Definition at line 1682 of file tinyxml2.cpp.
unsigned UnsignedText | ( | unsigned | defaultValue = 0 | ) | const |
See QueryIntText()
Definition at line 1883 of file tinyxml2.cpp.
|
friend |
Definition at line 1244 of file tinyxml2.h.
|
private |
Definition at line 1633 of file tinyxml2.h.
|
private |
Definition at line 1637 of file tinyxml2.h.