#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 () |
| const TiXmlAttribute * | Find (const char *_name) const |
| TiXmlAttribute * | Find (const char *_name) |
| const TiXmlAttribute * | Find (const std::string &_name) const |
| TiXmlAttribute * | Find (const std::string &_name) |
Private Member Functions | |
| TiXmlAttributeSet (const TiXmlAttributeSet &) | |
| void | operator= (const TiXmlAttributeSet &) |
Private Attributes | |
| TiXmlAttribute | sentinel |
|
|
Definition at line 1484 of file tinyxml.cpp. References TiXmlAttribute::next, TiXmlAttribute::prev, and sentinel.
|
|
|
Definition at line 1491 of file tinyxml.cpp. References TiXmlAttribute::next, TiXmlAttribute::prev, and sentinel. 01492 {
01493 assert( sentinel.next == &sentinel );
01494 assert( sentinel.prev == &sentinel );
01495 }
|
|
|
|
|
|
Definition at line 1498 of file tinyxml.cpp. References Find(), TiXmlAttribute::Name(), TiXmlAttribute::next, TiXmlAttribute::prev, sentinel, and TIXML_STRING. Referenced by TiXmlElement::Parse(), and TiXmlElement::SetAttribute(). 01499 {
01500 #ifdef TIXML_USE_STL
01501 assert( !Find( TIXML_STRING( addMe->Name() ) ) ); // Shouldn't be multiply adding to the set.
01502 #else
01503 assert( !Find( addMe->Name() ) ); // Shouldn't be multiply adding to the set.
01504 #endif
01505
01506 addMe->next = &sentinel;
01507 addMe->prev = sentinel.prev;
01508
01509 sentinel.prev->next = addMe;
01510 sentinel.prev = addMe;
01511 }
|
|
|
Definition at line 921 of file tinyxml.h. 00921 {
00922 return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttributeSet* >(this))->Find( _name ) );
00923 }
|
|
|
Definition at line 1533 of file tinyxml.cpp. References TiXmlAttribute::name, TiXmlAttribute::next, and sentinel. 01534 {
01535 for( const TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next )
01536 {
01537 if ( node->name == name )
01538 return node;
01539 }
01540 return 0;
01541 }
|
|
|
Definition at line 916 of file tinyxml.h. 00916 {
00917 return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttributeSet* >(this))->Find( _name ) );
00918 }
|
|
|
Definition at line 1557 of file tinyxml.cpp. References TiXmlAttribute::name, TiXmlAttribute::next, and sentinel. Referenced by Add(), TiXmlElement::Attribute(), TiXmlElement::Parse(), TiXmlElement::QueryDoubleAttribute(), TiXmlElement::QueryIntAttribute(), TiXmlElement::QueryValueAttribute(), TiXmlElement::RemoveAttribute(), and TiXmlElement::SetAttribute(). 01558 {
01559 for( const TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next )
01560 {
01561 if ( strcmp( node->name.c_str(), name ) == 0 )
01562 return node;
01563 }
01564 return 0;
01565 }
|
|
|
Definition at line 911 of file tinyxml.h. References TiXmlNode::next.
|
|
|
Definition at line 910 of file tinyxml.h. References TiXmlNode::next. Referenced by TiXmlElement::Accept(), TiXmlElement::ClearThis(), TiXmlElement::CopyTo(), TiXmlElement::FirstAttribute(), and TiXmlElement::Print().
|
|
|
Definition at line 913 of file tinyxml.h. References TiXmlNode::prev.
|
|
|
Definition at line 912 of file tinyxml.h. References TiXmlNode::prev. Referenced by TiXmlElement::LastAttribute().
|
|
|
|
|
|
Definition at line 1513 of file tinyxml.cpp. References TiXmlAttribute::next, TiXmlAttribute::prev, and sentinel. Referenced by TiXmlElement::ClearThis(), and TiXmlElement::RemoveAttribute(). 01514 {
01515 TiXmlAttribute* node;
01516
01517 for( node = sentinel.next; node != &sentinel; node = node->next )
01518 {
01519 if ( node == removeMe )
01520 {
01521 node->prev->next = node->next;
01522 node->next->prev = node->prev;
01523 node->next = 0;
01524 node->prev = 0;
01525 return;
01526 }
01527 }
01528 assert( 0 ); // we tried to remove a non-linked attribute.
01529 }
|
|
|
Definition at line 933 of file tinyxml.h. Referenced by Add(), Find(), Remove(), TiXmlAttributeSet(), and ~TiXmlAttributeSet(). |
1.3.9.1