Public Member Functions | Private Member Functions | Private Attributes | Friends

TiXmlAttribute Class Reference

#include <tinyxml.h>

Inheritance diagram for TiXmlAttribute:
Inheritance graph
[legend]
Collaboration diagram for TiXmlAttribute:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Private Member Functions

Private Attributes

Friends


Detailed Description

An attribute is a name-value pair. Elements have an arbitrary number of attributes, each with a unique name.

Note:
The attributes are not TiXmlNodes, since they are not part of the tinyXML document object model. There are other suggested ways to look at this problem.

Constructor & Destructor Documentation

TiXmlAttribute::TiXmlAttribute (  )  [inline]

Construct an empty attribute.

References document, next, and prev.

TiXmlAttribute::TiXmlAttribute ( const char *  _name,
const char *  _value 
) [inline]

Construct an attribute with a name and value.

References document, name, next, prev, and value.

TiXmlAttribute::TiXmlAttribute ( const TiXmlAttribute  )  [private]

Member Function Documentation

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

const int TiXmlAttribute::IntValue (  )  const

Return the value of this attribute, converted to an integer.

References TiXmlString::c_str(), and value.

Here is the call graph for this function:

const double TiXmlAttribute::DoubleValue (  )  const

Return the value of this attribute, converted to a double.

References TiXmlString::c_str(), and value.

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

int TiXmlAttribute::QueryDoubleValue ( double *  value  )  const

QueryDoubleValue examines the value string. See QueryIntValue().

References TiXmlString::c_str(), and value.

Referenced by TiXmlElement::QueryDoubleAttribute().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

void TiXmlAttribute::SetIntValue ( int  value  ) 

Set the value from an integer.

References SetValue().

Here is the call graph for this function:

void TiXmlAttribute::SetDoubleValue ( double  value  ) 

Set the value from a double.

References SetValue().

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

TiXmlAttribute * TiXmlAttribute::Previous (  )  const

Get the previous sibling attribute in the DOM. Returns null at beginning.

References TiXmlString::empty(), name, prev, and value.

Here is the call graph for this function:

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]
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.

Here is the call graph for this function:

void TiXmlAttribute::StreamOut ( TiXmlOutStream out  )  const [virtual]

Implements TiXmlBase.

References TiXmlString::find(), name, TiXmlBase::PutString(), and value.

Referenced by TiXmlElement::StreamOut().

Here is the call graph for this function:

Here is the caller graph for this function:

void TiXmlAttribute::SetDocument ( TiXmlDocument doc  )  [inline]

References document.

Referenced by TiXmlElement::Parse().

Here is the caller graph for this function:

void TiXmlAttribute::operator= ( const TiXmlAttribute base  )  [private]

Friends And Related Function Documentation

friend class TiXmlAttributeSet [friend]

Member Data Documentation

Referenced by SetDocument(), and TiXmlAttribute().


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