ticpp::Attribute Class Reference

Wrapper around TiXmlAttribute. More...

#include <ticpp.h>

Inheritance diagram for ticpp::Attribute:

ticpp::Base

List of all members.

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.
AttributeNext (bool throwIfNoAttribute=true) const
 Get the next sibling attribute in the DOM.
AttributePrevious (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.


Detailed Description

Wrapper around TiXmlAttribute.

Constructor & Destructor Documentation

ticpp::Attribute::Attribute ( const std::string &  name,
const std::string &  value 
)

Construct an attribute with name and value.

Parameters:
name The name of the attribute
value The value of the attribute


Member Function Documentation

template<class T>
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.

Parameters:
value [OUT] A pointer to fill with the value

References ticpp::Base::FromString(), and TiXmlAttribute::ValueStr().

std::string ticpp::Attribute::Value (  )  const

Get the value of this attribute.

Simple wrapper for TiXmlAttribute::ValueStr.

See also:
GetValue

template<class T>
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.

Parameters:
value The value to set

References TiXmlAttribute::SetValue(), and ticpp::Base::ToString().

template<class T>
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.

Parameters:
name [OUT] A pointer to fill with the name

References ticpp::Base::FromString(), and TiXmlAttribute::Name().

std::string ticpp::Attribute::Name (  )  const

Get the value of this attribute.

Simple wrapper for TiXmlAttribute::Name.

See also:
GetName

template<class T>
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.

Parameters:
name The name to set

References TiXmlAttribute::SetName(), and ticpp::Base::ToString().


The documentation for this class was generated from the following file:

Generated on Sun Feb 15 23:12:13 2009 for TinyXml by  doxygen 1.5.6