#include <tinyxml.h>
An attribute is a name-value pair. Elements have an arbitrary number of attributes, each with a unique name.
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.
References TiXmlString::c_str(), and name.
Referenced by TiXmlAttributeSet::Add(), TiXmlElement::CopyTo(), and TiXmlElement::Parse().
const char* TiXmlAttribute::Value | ( | ) | const [inline] |
Return the value of this attribute.
References TiXmlString::c_str(), and value.
Referenced by TiXmlElement::Attribute(), TiXmlElement::CopyTo(), TiXmlDeclaration::Parse(), TiXmlElement::Parse(), and ReadXmlField().
const int TiXmlAttribute::IntValue | ( | ) | const |
Return the value of this attribute, converted to an integer.
References TiXmlString::c_str(), and value.
const double TiXmlAttribute::DoubleValue | ( | ) | const |
Return the value of this attribute, converted to a double.
References TiXmlString::c_str(), and value.
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.
References TiXmlString::c_str(), and value.
Referenced by TiXmlElement::QueryIntAttribute().
int TiXmlAttribute::QueryDoubleValue | ( | double * | value | ) | const |
QueryDoubleValue examines the value string. See QueryIntValue().
References TiXmlString::c_str(), and value.
Referenced by TiXmlElement::QueryDoubleAttribute().
void TiXmlAttribute::SetName | ( | const char * | _name | ) | [inline] |
Set the name of this attribute.
References name.
void TiXmlAttribute::SetValue | ( | const char * | _value | ) | [inline] |
Set the value.
References value.
Referenced by TiXmlElement::Parse(), TiXmlElement::SetAttribute(), SetDoubleValue(), and SetIntValue().
void TiXmlAttribute::SetIntValue | ( | int | value | ) |
void TiXmlAttribute::SetDoubleValue | ( | double | value | ) |
TiXmlAttribute * TiXmlAttribute::Next | ( | ) | const |
Get the next sibling attribute in the DOM. Returns null at end.
References TiXmlString::empty(), name, next, and value.
Referenced by TiXmlElement::CopyTo(), TiXmlElement::Print(), and TiXmlElement::StreamOut().
TiXmlAttribute * TiXmlAttribute::Previous | ( | ) | const |
Get the previous sibling attribute in the DOM. Returns null at beginning.
References TiXmlString::empty(), name, prev, and value.
bool TiXmlAttribute::operator== | ( | const TiXmlAttribute & | rhs | ) | const [inline] |
References name.
bool TiXmlAttribute::operator< | ( | const TiXmlAttribute & | rhs | ) | const [inline] |
References name.
bool TiXmlAttribute::operator> | ( | const TiXmlAttribute & | rhs | ) | const [inline] |
References name.
const char * TiXmlAttribute::Parse | ( | const char * | p, | |
TiXmlParsingData * | data, | |||
TiXmlEncoding | encoding | |||
) | [virtual] |
Implements TiXmlBase.
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.
References TiXmlString::find(), name, TiXmlBase::PutString(), TIXML_STRING, and value.
void TiXmlAttribute::StreamOut | ( | TiXmlOutStream * | out | ) | const [virtual] |
Implements TiXmlBase.
References TiXmlString::find(), name, TiXmlBase::PutString(), and value.
Referenced by TiXmlElement::StreamOut().
void TiXmlAttribute::SetDocument | ( | TiXmlDocument * | doc | ) | [inline] |
References document.
Referenced by TiXmlElement::Parse().
void TiXmlAttribute::operator= | ( | const TiXmlAttribute & | base | ) | [private] |
friend class TiXmlAttributeSet [friend] |
TiXmlDocument* TiXmlAttribute::document [private] |
Referenced by SetDocument(), and TiXmlAttribute().
TiXmlString TiXmlAttribute::name [private] |
Referenced by TiXmlAttributeSet::Find(), Name(), Next(), operator<(), operator==(), operator>(), Parse(), Previous(), Print(), SetName(), StreamOut(), and TiXmlAttribute().
TiXmlString TiXmlAttribute::value [private] |
Referenced by DoubleValue(), IntValue(), Next(), Parse(), Previous(), Print(), QueryDoubleValue(), QueryIntValue(), SetValue(), StreamOut(), TiXmlAttribute(), and Value().
TiXmlAttribute* TiXmlAttribute::prev [private] |
TiXmlAttribute* TiXmlAttribute::next [private] |