muMECH
1.0
|
An attribute is a name-value pair. More...
#include <tinyxml2.h>
Public Member Functions | |
const char * | Name () const |
The name of the attribute. More... | |
const char * | Value () const |
The value of the attribute. More... | |
const XMLAttribute * | Next () const |
The next attribute in the list. More... | |
int | IntValue () const |
IntValue interprets the attribute as an integer, and returns the value. More... | |
unsigned | UnsignedValue () const |
Query as an unsigned integer. See IntValue() More... | |
bool | BoolValue () const |
Query as a boolean. See IntValue() More... | |
double | DoubleValue () const |
Query as a double. See IntValue() More... | |
float | FloatValue () const |
Query as a float. See IntValue() More... | |
XMLError | QueryLongValue (long *value) const |
QueryIntValue interprets the attribute as an integer, and returns the value in the provided parameter. More... | |
XMLError | QueryIntValue (int *value) const |
See QueryIntValue. More... | |
XMLError | QueryUnsignedValue (unsigned int *value) const |
See QueryIntValue. More... | |
XMLError | QueryBoolValue (bool *value) const |
See QueryIntValue. More... | |
XMLError | QueryDoubleValue (double *value) const |
See QueryIntValue. More... | |
XMLError | QueryFloatValue (float *value) const |
See QueryIntValue. More... | |
void | SetAttribute (const char *value) |
Set the attribute to a string value. More... | |
void | SetAttribute (int value) |
Set the attribute to value. More... | |
void | SetAttribute (unsigned value) |
Set the attribute to value. More... | |
void | SetAttribute (bool value) |
Set the attribute to value. More... | |
void | SetAttribute (double value) |
Set the attribute to value. More... | |
void | SetAttribute (float value) |
Set the attribute to value. More... | |
Private Types | |
enum | { BUF_SIZE = 200 } |
Private Member Functions | |
XMLAttribute () | |
virtual | ~XMLAttribute () |
XMLAttribute (const XMLAttribute &) | |
void | operator= (const XMLAttribute &) |
void | SetName (const char *name) |
char * | ParseDeep (char *p, bool processEntities) |
Private Attributes | |
StrPair | _name |
StrPair | _value |
XMLAttribute * | _next |
MemPool * | _memPool |
Friends | |
class | XMLElement |
An attribute is a name-value pair.
Elements have an arbitrary number of attributes, each with a unique name.
Definition at line 1013 of file tinyxml2.h.
|
private |
Enumerator | |
---|---|
BUF_SIZE |
Definition at line 1094 of file tinyxml2.h.
|
inlineprivate |
Definition at line 1096 of file tinyxml2.h.
|
inlineprivatevirtual |
Definition at line 1097 of file tinyxml2.h.
|
private |
|
inline |
Query as a boolean. See IntValue()
Definition at line 1046 of file tinyxml2.h.
|
inline |
Query as a double. See IntValue()
Definition at line 1052 of file tinyxml2.h.
|
inline |
Query as a float. See IntValue()
Definition at line 1058 of file tinyxml2.h.
|
inline |
IntValue interprets the attribute as an integer, and returns the value.
If the value isn't an integer, 0 will be returned. There is no error checking; use QueryIntValue() if you need error checking.
Definition at line 1034 of file tinyxml2.h.
|
inline |
The name of the attribute.
Definition at line 1018 of file tinyxml2.h.
Referenced by tinyxml2::XMLElement::FindAttribute(), tinyxml2::XMLElement::ParseAttributes(), and tinyxml2::XMLPrinter::VisitEnter().
|
inline |
The next attribute in the list.
Definition at line 1026 of file tinyxml2.h.
Referenced by tinyxml2::XMLElement::ShallowClone(), tinyxml2::XMLElement::ShallowEqual(), and tinyxml2::XMLPrinter::VisitEnter().
|
private |
|
private |
Definition at line 1052 of file tinyxml2.cpp.
References tinyxml2::XMLNode::_value, tinyxml2::StrPair::ATTRIBUTE_VALUE, tinyxml2::StrPair::ATTRIBUTE_VALUE_LEAVE_ENTITIES, tinyxml2::StrPair::ParseText(), and tinyxml2::XMLUtil::SkipWhiteSpace().
Referenced by tinyxml2::XMLElement::ParseAttributes().
XMLError tinyxml2::XMLAttribute::QueryBoolValue | ( | bool * | value | ) | const |
See QueryIntValue.
Definition at line 1113 of file tinyxml2.cpp.
References tinyxml2::XMLUtil::ToBool(), tinyxml2::XMLNode::Value(), tinyxml2::XML_NO_ERROR, and tinyxml2::XML_WRONG_ATTRIBUTE_TYPE.
Referenced by tinyxml2::XMLElement::QueryBoolAttribute().
XMLError tinyxml2::XMLAttribute::QueryDoubleValue | ( | double * | value | ) | const |
See QueryIntValue.
Definition at line 1131 of file tinyxml2.cpp.
References tinyxml2::XMLUtil::ToDouble(), tinyxml2::XMLNode::Value(), tinyxml2::XML_NO_ERROR, and tinyxml2::XML_WRONG_ATTRIBUTE_TYPE.
Referenced by tinyxml2::XMLElement::QueryDoubleAttribute().
XMLError tinyxml2::XMLAttribute::QueryFloatValue | ( | float * | value | ) | const |
See QueryIntValue.
Definition at line 1122 of file tinyxml2.cpp.
References tinyxml2::XMLUtil::ToFloat(), tinyxml2::XMLNode::Value(), tinyxml2::XML_NO_ERROR, and tinyxml2::XML_WRONG_ATTRIBUTE_TYPE.
Referenced by tinyxml2::XMLElement::QueryFloatAttribute().
XMLError tinyxml2::XMLAttribute::QueryIntValue | ( | int * | value | ) | const |
See QueryIntValue.
Definition at line 1095 of file tinyxml2.cpp.
References tinyxml2::XMLUtil::ToInt(), tinyxml2::XMLNode::Value(), tinyxml2::XML_NO_ERROR, and tinyxml2::XML_WRONG_ATTRIBUTE_TYPE.
Referenced by tinyxml2::XMLElement::QueryIntAttribute().
XMLError tinyxml2::XMLAttribute::QueryLongValue | ( | long * | value | ) | const |
QueryIntValue interprets the attribute as an integer, and returns the value in the provided parameter.
The function will return XML_NO_ERROR on success, and XML_WRONG_ATTRIBUTE_TYPE if the conversion is not successful.
Definition at line 1086 of file tinyxml2.cpp.
References tinyxml2::XMLUtil::ToLong(), tinyxml2::XMLNode::Value(), tinyxml2::XML_NO_ERROR, and tinyxml2::XML_WRONG_ATTRIBUTE_TYPE.
Referenced by tinyxml2::XMLElement::QueryLongAttribute().
XMLError tinyxml2::XMLAttribute::QueryUnsignedValue | ( | unsigned int * | value | ) | const |
See QueryIntValue.
Definition at line 1104 of file tinyxml2.cpp.
References tinyxml2::XMLUtil::ToUnsigned(), tinyxml2::XMLNode::Value(), tinyxml2::XML_NO_ERROR, and tinyxml2::XML_WRONG_ATTRIBUTE_TYPE.
Referenced by tinyxml2::XMLElement::QueryUnsignedAttribute().
void tinyxml2::XMLAttribute::SetAttribute | ( | const char * | value | ) |
Set the attribute to a string value.
Definition at line 1140 of file tinyxml2.cpp.
References tinyxml2::XMLNode::_value, and tinyxml2::StrPair::SetStr().
Referenced by tinyxml2::XMLElement::SetAttribute().
void tinyxml2::XMLAttribute::SetAttribute | ( | int | value | ) |
Set the attribute to value.
Definition at line 1146 of file tinyxml2.cpp.
References tinyxml2::XMLNode::_value, tinyxml2::StrPair::SetStr(), and tinyxml2::XMLUtil::ToStr().
void tinyxml2::XMLAttribute::SetAttribute | ( | unsigned | value | ) |
Set the attribute to value.
Definition at line 1154 of file tinyxml2.cpp.
References tinyxml2::XMLNode::_value, tinyxml2::StrPair::SetStr(), and tinyxml2::XMLUtil::ToStr().
void tinyxml2::XMLAttribute::SetAttribute | ( | bool | value | ) |
Set the attribute to value.
Definition at line 1162 of file tinyxml2.cpp.
References tinyxml2::XMLNode::_value, tinyxml2::StrPair::SetStr(), and tinyxml2::XMLUtil::ToStr().
void tinyxml2::XMLAttribute::SetAttribute | ( | double | value | ) |
Set the attribute to value.
Definition at line 1169 of file tinyxml2.cpp.
References tinyxml2::XMLNode::_value, tinyxml2::StrPair::SetStr(), and tinyxml2::XMLUtil::ToStr().
void tinyxml2::XMLAttribute::SetAttribute | ( | float | value | ) |
Set the attribute to value.
Definition at line 1176 of file tinyxml2.cpp.
References tinyxml2::XMLNode::_value, tinyxml2::StrPair::SetStr(), and tinyxml2::XMLUtil::ToStr().
|
private |
Definition at line 1080 of file tinyxml2.cpp.
Referenced by tinyxml2::XMLElement::FindOrCreateAttribute().
|
inline |
Query as an unsigned integer. See IntValue()
Definition at line 1040 of file tinyxml2.h.
|
inline |
The value of the attribute.
Definition at line 1022 of file tinyxml2.h.
Referenced by tinyxml2::XMLElement::Attribute(), tinyxml2::XMLElement::ShallowEqual(), and tinyxml2::XMLPrinter::VisitEnter().
|
friend |
Definition at line 1015 of file tinyxml2.h.
|
private |
Definition at line 1108 of file tinyxml2.h.
Referenced by tinyxml2::XMLElement::FindOrCreateAttribute(), and tinyxml2::XMLElement::ParseAttributes().
|
mutableprivate |
Definition at line 1105 of file tinyxml2.h.
|
private |
Definition at line 1107 of file tinyxml2.h.
Referenced by tinyxml2::XMLElement::DeleteAttribute(), tinyxml2::XMLElement::FindAttribute(), tinyxml2::XMLElement::FindOrCreateAttribute(), tinyxml2::XMLElement::ParseAttributes(), and tinyxml2::XMLElement::~XMLElement().
|
mutableprivate |
Definition at line 1106 of file tinyxml2.h.