ticpp::Base Class Reference

Wrapper around TiXmlBase. More...

#include <ticpp.h>

Inheritance diagram for ticpp::Base:

ticpp::Attribute ticpp::Node ticpp::NodeImp< TiXmlComment > ticpp::NodeImp< TiXmlDeclaration > ticpp::NodeImp< TiXmlDocument > ticpp::NodeImp< TiXmlElement > ticpp::NodeImp< TiXmlStylesheetReference > ticpp::NodeImp< TiXmlText > ticpp::NodeImp< T > ticpp::Comment ticpp::Declaration ticpp::Document ticpp::Element ticpp::StylesheetReference ticpp::Text

List of all members.

Public Member Functions

template<class T>
std::string ToString (const T &value) const
 Converts any class with a proper overload of the << opertor to a std::string.
template<class T>
void FromString (const std::string &temp, T *out) const
 Converts a std::string to any class with a proper overload of the >> opertor.
void FromString (const std::string &temp, std::string *out) const
 Specialization for std::string.
int Row () const
 Return the position, in the original source file, of this node or attribute.
int Column () const
 Return the position, in the original source file, of this node or attribute.
bool operator== (const Base &rhs) const
 Compare internal TiXml pointers to determine is both are wrappers around the same node.
bool operator!= (const Base &rhs) const
 Compare internal TiXml pointers to determine is both are wrappers around the same node.
std::string BuildDetailedErrorString () const
 Builds detailed error string using TiXmlDocument::Error() and others.
virtual ~Base ()
 Destructor.

Protected Attributes

TiCppRCImp * m_impRC
 Holds status of internal TiXmlPointer - use this to determine if object has been deleted already.


Detailed Description

Wrapper around TiXmlBase.

Member Function Documentation

template<class T>
std::string ticpp::Base::ToString ( const T &  value  )  const [inline]

Converts any class with a proper overload of the << opertor to a std::string.

Parameters:
value The value to be converted
Exceptions:
Exception When value cannot be converted to a std::string

Referenced by ticpp::Element::SetAttribute(), ticpp::Attribute::SetName(), ticpp::Element::SetText(), ticpp::Node::SetValue(), and ticpp::Attribute::SetValue().

template<class T>
void ticpp::Base::FromString ( const std::string &  temp,
T *  out 
) const [inline]

Converts a std::string to any class with a proper overload of the >> opertor.

Parameters:
temp The string to be converted
out [OUT] The container for the returned value
Exceptions:
Exception When temp cannot be converted to the target type

Referenced by ticpp::Element::GetAttribute(), ticpp::Element::GetAttributeOrDefault(), ticpp::Attribute::GetName(), ticpp::Element::GetText(), ticpp::Element::GetTextOrDefault(), ticpp::Node::GetValue(), and ticpp::Attribute::GetValue().

int ticpp::Base::Row (  )  const [inline]

Return the position, in the original source file, of this node or attribute.

Wrapper around TiXmlBase::Row()

References TiXmlBase::Row().

int ticpp::Base::Column (  )  const [inline]

Return the position, in the original source file, of this node or attribute.

Wrapper around TiXmlBase::Row()

References TiXmlBase::Column().


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