osgEarth 2.1.1
|
#include <tinyxml.h>
Public Member Functions | |
TiXmlAttributeSet () | |
~TiXmlAttributeSet () | |
void | Add (TiXmlAttribute *attribute) |
void | Remove (TiXmlAttribute *attribute) |
const TiXmlAttribute * | First () const |
TiXmlAttribute * | First () |
const TiXmlAttribute * | Last () const |
TiXmlAttribute * | Last () |
TiXmlAttribute * | Find (const char *_name) const |
TiXmlAttribute * | FindOrCreate (const char *_name) |
Private Member Functions | |
TiXmlAttributeSet (const TiXmlAttributeSet &) | |
void | operator= (const TiXmlAttributeSet &) |
Private Attributes | |
TiXmlAttribute | sentinel |
TiXmlAttributeSet::TiXmlAttributeSet | ( | ) |
TiXmlAttributeSet::~TiXmlAttributeSet | ( | ) |
TiXmlAttributeSet::TiXmlAttributeSet | ( | const TiXmlAttributeSet & | ) | [private] |
void TiXmlAttributeSet::Add | ( | TiXmlAttribute * | attribute | ) |
Definition at line 1467 of file tinyxml.cpp.
{ #ifdef TIXML_USE_STL assert( !Find( TIXML_STRING( addMe->Name() ) ) ); // Shouldn't be multiply adding to the set. #else assert( !Find( addMe->Name() ) ); // Shouldn't be multiply adding to the set. #endif addMe->next = &sentinel; addMe->prev = sentinel.prev; sentinel.prev->next = addMe; sentinel.prev = addMe; }
TiXmlAttribute * TiXmlAttributeSet::Find | ( | const char * | _name | ) | const |
Definition at line 1525 of file tinyxml.cpp.
{ for( TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next ) { if ( strcmp( node->name.c_str(), name ) == 0 ) return node; } return 0; }
TiXmlAttribute * TiXmlAttributeSet::FindOrCreate | ( | const char * | _name | ) |
Definition at line 1536 of file tinyxml.cpp.
{ TiXmlAttribute* attrib = Find( _name ); if ( !attrib ) { attrib = new TiXmlAttribute(); Add( attrib ); attrib->SetName( _name ); } return attrib; }
TiXmlAttribute* TiXmlAttributeSet::First | ( | ) | [inline] |
const TiXmlAttribute* TiXmlAttributeSet::First | ( | ) | const [inline] |
const TiXmlAttribute* TiXmlAttributeSet::Last | ( | ) | const [inline] |
TiXmlAttribute* TiXmlAttributeSet::Last | ( | ) | [inline] |
void TiXmlAttributeSet::operator= | ( | const TiXmlAttributeSet & | ) | [private] |
void TiXmlAttributeSet::Remove | ( | TiXmlAttribute * | attribute | ) |
Definition at line 1482 of file tinyxml.cpp.
{ TiXmlAttribute* node; for( node = sentinel.next; node != &sentinel; node = node->next ) { if ( node == removeMe ) { node->prev->next = node->next; node->next->prev = node->prev; node->next = 0; node->prev = 0; return; } } assert( 0 ); // we tried to remove a non-linked attribute. }
TiXmlAttribute TiXmlAttributeSet::sentinel [private] |