#include <ticpp.h>
Public Member Functions | |
Attribute () | |
Construct an empty attribute. | |
Attribute (const std::string &name, const std::string &value) | |
Construct an attribute with name and value. | |
template<class T> | |
void | GetValue (T *value) const |
Get the value of this attribute Uses Base::FromString to convert TiXmlAttribute::ValueStr from a std::string, and puts it in the passed pointer. | |
std::string | Value () const |
Get the value of this attribute. | |
template<class T> | |
void | SetValue (const T &value) |
Set the value of this node. | |
template<class T> | |
void | GetName (T *name) const |
Get the value of this attribute Uses Base::FromString to convert TiXmlAttribute::Name from a std::string, and puts it in the passed pointer. | |
std::string | Name () const |
Get the value of this attribute. | |
template<class T> | |
void | SetName (const T &name) |
Set the value of this attribute. | |
Attribute * | Next (bool throwIfNoAttribute=true) const |
Get the next sibling attribute in the DOM. | |
Attribute * | Previous (bool throwIfNoAttribute=true) const |
Get the previous sibling attribute in the DOM. | |
virtual void | Print (FILE *file, int depth) const |
All TinyXml classes can print themselves to a filestream. |
ticpp::Attribute::Attribute | ( | const std::string & | name, | |
const std::string & | value | |||
) |
Construct an attribute with name and value.
name | The name of the attribute | |
value | The value of the attribute |
void ticpp::Attribute::GetValue | ( | T * | value | ) | const [inline] |
Get the value of this attribute Uses Base::FromString to convert TiXmlAttribute::ValueStr from a std::string, and puts it in the passed pointer.
value | [OUT] A pointer to fill with the value |
References ticpp::Base::FromString(), and TiXmlAttribute::ValueStr().
std::string ticpp::Attribute::Value | ( | ) | const |
void ticpp::Attribute::SetValue | ( | const T & | value | ) | [inline] |
Set the value of this node.
Uses Base::ToString to convert value to a std::string, then calls TiXmlAttribute::SetValue.
value | The value to set |
References TiXmlAttribute::SetValue(), and ticpp::Base::ToString().
void ticpp::Attribute::GetName | ( | T * | name | ) | const [inline] |
Get the value of this attribute Uses Base::FromString to convert TiXmlAttribute::Name from a std::string, and puts it in the passed pointer.
name | [OUT] A pointer to fill with the name |
References ticpp::Base::FromString(), and TiXmlAttribute::Name().
std::string ticpp::Attribute::Name | ( | ) | const |
void ticpp::Attribute::SetName | ( | const T & | name | ) | [inline] |
Set the value of this attribute.
Uses Base::ToString to convert name to a std::string, then calls TiXmlAttribute::SetName.
name | The name to set |
References TiXmlAttribute::SetName(), and ticpp::Base::ToString().