#include <tinyxml.h>


Public Member Functions | |
| TiXmlAttribute () | |
| Construct an empty attribute. | |
| TiXmlAttribute (const char *_name, const char *_value) | |
| Construct an attribute with a name and value. | |
| const char * | Name () const |
| Return the name of this attribute. | |
| const char * | Value () const |
| Return the value of this attribute. | |
| int | IntValue () const |
| Return the value of this attribute, converted to an integer. | |
| double | DoubleValue () const |
| Return the value of this attribute, converted to a double. | |
| const TIXML_STRING & | NameTStr () const |
| int | QueryIntValue (int *_value) const |
| int | QueryDoubleValue (double *_value) const |
| QueryDoubleValue examines the value string. See QueryIntValue(). | |
| void | SetName (const char *_name) |
| Set the name of this attribute. | |
| void | SetValue (const char *_value) |
| Set the value. | |
| void | SetIntValue (int _value) |
| Set the value from an integer. | |
| void | SetDoubleValue (double _value) |
| Set the value from a double. | |
| const TiXmlAttribute * | Next () const |
| Get the next sibling attribute in the DOM. Returns null at end. | |
| TiXmlAttribute * | Next () |
| const TiXmlAttribute * | Previous () const |
| Get the previous sibling attribute in the DOM. Returns null at beginning. | |
| TiXmlAttribute * | Previous () |
| bool | operator== (const TiXmlAttribute &rhs) const |
| bool | operator< (const TiXmlAttribute &rhs) const |
| bool | operator> (const TiXmlAttribute &rhs) const |
| virtual const char * | Parse (const char *p, TiXmlParsingData *data, TiXmlEncoding encoding) |
| virtual void | Print (FILE *cfile, int depth) const |
| virtual void | StreamOut (TIXML_OSTREAM *out) const |
| void | SetDocument (TiXmlDocument *doc) |
Private Member Functions | |
| TiXmlAttribute (const TiXmlAttribute &) | |
| void | operator= (const TiXmlAttribute &base) |
Private Attributes | |
| TiXmlDocument * | document |
| TIXML_STRING | name |
| TIXML_STRING | value |
| TiXmlAttribute * | prev |
| TiXmlAttribute * | next |
Friends | |
| class | TiXmlAttributeSet |
Definition at line 693 of file tinyxml.h.
| TiXmlAttribute::TiXmlAttribute | ( | ) | [inline] |
| TiXmlAttribute::TiXmlAttribute | ( | const char * | _name, | |
| const char * | _value | |||
| ) | [inline] |
| TiXmlAttribute::TiXmlAttribute | ( | const TiXmlAttribute & | ) | [private] |
| const char* TiXmlAttribute::Name | ( | ) | const [inline] |
Return the name of this attribute.
Definition at line 725 of file tinyxml.h.
References name.
Referenced by TiXmlAttributeSet::Add(), TiXmlElement::CopyTo(), and Lugre::LuaXML_ParseNode().
| const char* TiXmlAttribute::Value | ( | ) | const [inline] |
Return the value of this attribute.
Definition at line 726 of file tinyxml.h.
References value.
Referenced by TiXmlElement::Attribute(), TiXmlElement::CopyTo(), Lugre::LuaXML_ParseNode(), TiXmlDeclaration::Parse(), and TiXmlElement::Parse().
| int TiXmlAttribute::IntValue | ( | ) | const |
Return the value of this attribute, converted to an integer.
Definition at line 1333 of file tinyxml.cpp.
References value.
| double TiXmlAttribute::DoubleValue | ( | ) | const |
Return the value of this attribute, converted to a double.
Definition at line 1338 of file tinyxml.cpp.
References value.
| const TIXML_STRING& TiXmlAttribute::NameTStr | ( | ) | const [inline] |
| int TiXmlAttribute::QueryIntValue | ( | int * | _value | ) | const |
QueryIntValue examines the value string. It is an alternative to the IntValue() method with richer error checking. If the value is an integer, it is stored in 'value' and the call returns TIXML_SUCCESS. If it is not an integer, it returns TIXML_WRONG_TYPE.
A specialized but useful call. Note that for success it returns 0, which is the opposite of almost all other TinyXml calls.
Definition at line 1297 of file tinyxml.cpp.
References TIXML_SUCCESS, TIXML_WRONG_TYPE, and value.
Referenced by TiXmlElement::QueryIntAttribute().
| int TiXmlAttribute::QueryDoubleValue | ( | double * | _value | ) | const |
QueryDoubleValue examines the value string. See QueryIntValue().
Definition at line 1304 of file tinyxml.cpp.
References TIXML_SUCCESS, TIXML_WRONG_TYPE, and value.
Referenced by TiXmlElement::QueryDoubleAttribute().
| void TiXmlAttribute::SetName | ( | const char * | _name | ) | [inline] |
| void TiXmlAttribute::SetValue | ( | const char * | _value | ) | [inline] |
Set the value.
Definition at line 747 of file tinyxml.h.
References value.
Referenced by TiXmlElement::Parse(), TiXmlElement::SetAttribute(), SetDoubleValue(), and SetIntValue().
| void TiXmlAttribute::SetIntValue | ( | int | _value | ) |
| void TiXmlAttribute::SetDoubleValue | ( | double | _value | ) |
| const TiXmlAttribute * TiXmlAttribute::Next | ( | ) | const |
Get the next sibling attribute in the DOM. Returns null at end.
Definition at line 1229 of file tinyxml.cpp.
References name, next, and value.
Referenced by TiXmlElement::CopyTo(), Lugre::LuaXML_ParseNode(), TiXmlElement::Print(), and TiXmlElement::StreamOut().
| TiXmlAttribute * TiXmlAttribute::Next | ( | ) |
| const TiXmlAttribute * TiXmlAttribute::Previous | ( | ) | const |
Get the previous sibling attribute in the DOM. Returns null at beginning.
Definition at line 1247 of file tinyxml.cpp.
| TiXmlAttribute * TiXmlAttribute::Previous | ( | ) |
| bool TiXmlAttribute::operator== | ( | const TiXmlAttribute & | rhs | ) | const [inline] |
| bool TiXmlAttribute::operator< | ( | const TiXmlAttribute & | rhs | ) | const [inline] |
| bool TiXmlAttribute::operator> | ( | const TiXmlAttribute & | rhs | ) | const [inline] |
| const char * TiXmlAttribute::Parse | ( | const char * | p, | |
| TiXmlParsingData * | data, | |||
| TiXmlEncoding | encoding | |||
| ) | [virtual] |
Implements TiXmlBase.
Definition at line 1326 of file tinyxmlparser.cpp.
References TiXmlParsingData::Cursor(), TiXmlBase::IsWhiteSpace(), TiXmlBase::location, name, TiXmlBase::ReadName(), TiXmlBase::ReadText(), TiXmlDocument::SetError(), TiXmlBase::SkipWhiteSpace(), TiXmlParsingData::Stamp(), TiXmlDocument::TabSize(), TiXmlDocument::tabsize, TiXmlBase::TIXML_ERROR_READING_ATTRIBUTES, and value.
Referenced by TiXmlDeclaration::Parse(), and TiXmlElement::Parse().
| void TiXmlAttribute::Print | ( | FILE * | cfile, | |
| int | depth | |||
| ) | const [virtual] |
All TinyXml classes can print themselves to a filestream. This is a formatted print, and will insert tabs and newlines.
(For an unformatted stream, use the << operator.)
Implements TiXmlBase.
Definition at line 1265 of file tinyxml.cpp.
References TiXmlBase::PutString(), TIXML_STRING, and value.
| void TiXmlAttribute::StreamOut | ( | TIXML_OSTREAM * | out | ) | const [virtual] |
Implements TiXmlBase.
Definition at line 1279 of file tinyxml.cpp.
References TiXmlBase::PutString(), and value.
Referenced by TiXmlElement::StreamOut().
| void TiXmlAttribute::SetDocument | ( | TiXmlDocument * | doc | ) | [inline] |
| void TiXmlAttribute::operator= | ( | const TiXmlAttribute & | base | ) | [private] |
friend class TiXmlAttributeSet [friend] |
TiXmlDocument* TiXmlAttribute::document [private] |
TIXML_STRING TiXmlAttribute::name [private] |
Definition at line 788 of file tinyxml.h.
Referenced by TiXmlAttributeSet::Find(), Name(), NameTStr(), Next(), operator<(), operator==(), operator>(), Parse(), Previous(), SetName(), and TiXmlAttribute().
TIXML_STRING TiXmlAttribute::value [private] |
Definition at line 789 of file tinyxml.h.
Referenced by DoubleValue(), IntValue(), Next(), Parse(), Previous(), Print(), QueryDoubleValue(), QueryIntValue(), SetValue(), StreamOut(), TiXmlAttribute(), and Value().
TiXmlAttribute* TiXmlAttribute::prev [private] |
Definition at line 790 of file tinyxml.h.
Referenced by TiXmlAttributeSet::Add(), TiXmlAttributeSet::Last(), Previous(), TiXmlAttributeSet::Remove(), TiXmlAttribute(), TiXmlAttributeSet::TiXmlAttributeSet(), and TiXmlAttributeSet::~TiXmlAttributeSet().
TiXmlAttribute* TiXmlAttribute::next [private] |
Definition at line 791 of file tinyxml.h.
Referenced by TiXmlAttributeSet::Add(), TiXmlAttributeSet::Find(), TiXmlAttributeSet::First(), Next(), TiXmlAttributeSet::Remove(), TiXmlAttribute(), TiXmlAttributeSet::TiXmlAttributeSet(), and TiXmlAttributeSet::~TiXmlAttributeSet().
1.5.6