TiXmlElement Class Reference

The element is a container class. More...

#include <tinyxml.h>

Inheritance diagram for TiXmlElement:

Inheritance graph
[legend]
Collaboration diagram for TiXmlElement:

Collaboration graph
[legend]

Public Member Functions

 TiXmlElement (const char *in_value)
 Construct an element.
 TiXmlElement (const std::string &_value)
 std::string constructor.
virtual ~TiXmlElement ()
const char * Attribute (const std::string &name) const
const char * Attribute (const std::string &name, int *i) const
void SetAttribute (const std::string &name, const std::string &value)
 STL std::string form.
void SetAttribute (const std::string &name, int value)
void SetAttribute (const char *name, int value)
 Sets an attribute of name to a given value.
void RemoveAttribute (const char *name)
 Deletes an attribute with the given name.
void RemoveAttribute (const std::string &name)
 STL std::string form.
TiXmlAttribute * FirstAttribute () const
 Access the first attribute in this element.
TiXmlAttribute * LastAttribute () const
 Access the last attribute in this element.
virtual TiXmlNode * Clone () const
virtual void Print (FILE *cfile, int depth) const
 All TinyXml classes can print themselves to a filestream.

Protected Member Functions

virtual void StreamIn (TIXML_ISTREAM *in, TIXML_STRING *tag)
virtual void StreamOut (TIXML_OSTREAM *out) const
virtual const char * Parse (const char *p)
const char * ReadValue (const char *in)

Private Attributes

TiXmlAttributeSet attributeSet

Detailed Description

The element is a container class.

It has a value, the element name, and can contain other elements, text, comments, and unknowns. Elements also contain an arbitrary number of attributes.

Definition at line 628 of file tinyxml.h.


Constructor & Destructor Documentation

TiXmlElement::TiXmlElement ( const char *  in_value  ) 

Construct an element.

Definition at line 456 of file tinyxml.cpp.

References TiXmlNode::firstChild, TiXmlNode::lastChild, and TiXmlNode::value.

Referenced by Clone().

TiXmlElement::TiXmlElement ( const std::string &  _value  )  [inline]

std::string constructor.

Definition at line 636 of file tinyxml.h.

TiXmlElement::~TiXmlElement (  )  [virtual]


Member Function Documentation

const char * TiXmlElement::Attribute ( const std::string &  name,
int *  i 
) const

Definition at line 545 of file tinyxml.cpp.

References Attribute().

const char * TiXmlElement::Attribute ( const std::string &  name  )  const

TiXmlNode * TiXmlElement::Clone (  )  const [virtual]

TiXmlAttribute* TiXmlElement::FirstAttribute (  )  const [inline]

Access the first attribute in this element.

Definition at line 691 of file tinyxml.h.

TiXmlAttribute* TiXmlElement::LastAttribute (  )  const [inline]

Access the last attribute in this element.

Definition at line 692 of file tinyxml.h.

const char * TiXmlElement::Parse ( const char *  p  )  [protected, virtual]

void TiXmlElement::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.

Definition at line 590 of file tinyxml.cpp.

References attributeSet, TiXmlAttributeSet::First(), TiXmlNode::firstChild, TiXmlNode::lastChild, TiXmlAttribute::Next(), TiXmlNode::NextSibling(), TiXmlBase::Print(), and TiXmlNode::ToText().

const char * TiXmlElement::ReadValue ( const char *  in  )  [protected]

void TiXmlElement::RemoveAttribute ( const std::string &  name  )  [inline]

STL std::string form.

Definition at line 688 of file tinyxml.h.

References RemoveAttribute().

Referenced by RemoveAttribute().

void TiXmlElement::RemoveAttribute ( const char *  name  ) 

Deletes an attribute with the given name.

Definition at line 374 of file tinyxml.cpp.

References attributeSet, TiXmlAttributeSet::Find(), and TiXmlAttributeSet::Remove().

void TiXmlElement::SetAttribute ( const char *  name,
int  value 
)

Sets an attribute of name to a given value.

The attribute will be created if it does not exist, or changed if it does.

void TiXmlElement::SetAttribute ( const std::string &  name,
int  value 
)

Definition at line 559 of file tinyxml.cpp.

References SetAttribute().

void TiXmlElement::SetAttribute ( const std::string &  name,
const std::string &  value 
)

void TiXmlElement::StreamIn ( TIXML_ISTREAM *  in,
TIXML_STRING *  tag 
) [protected, virtual]

void TiXmlElement::StreamOut ( TIXML_OSTREAM *  out  )  const [protected, virtual]


Field Documentation

Definition at line 721 of file tinyxml.h.

Referenced by Attribute(), Clone(), Print(), RemoveAttribute(), SetAttribute(), StreamOut(), and ~TiXmlElement().


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

Generated on Sun Nov 23 04:12:56 2008 for Sofa by  doxygen 1.5.7.1