Back to index

nux  3.0.0
Public Member Functions | Private Member Functions | Private Attributes
TiXmlAttributeSet Class Reference

#include <tinyxml.h>

Collaboration diagram for TiXmlAttributeSet:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TiXmlAttributeSet ()
 ~TiXmlAttributeSet ()
void Add (TiXmlAttribute *attribute)
void Remove (TiXmlAttribute *attribute)
const TiXmlAttributeFirst () const
TiXmlAttributeFirst ()
const TiXmlAttributeLast () const
TiXmlAttributeLast ()
const TiXmlAttributeFind (const char *_name) const
TiXmlAttributeFind (const char *_name)

Private Member Functions

 TiXmlAttributeSet (const TiXmlAttributeSet &)
void operator= (const TiXmlAttributeSet &)

Private Attributes

TiXmlAttribute sentinel

Detailed Description

Definition at line 1162 of file tinyxml.h.


Constructor & Destructor Documentation

Definition at line 1688 of file tinyxml.cpp.

Definition at line 1695 of file tinyxml.cpp.

{
  assert ( sentinel.next == &sentinel );
  assert ( sentinel.prev == &sentinel );
}

Member Function Documentation

void TiXmlAttributeSet::Add ( TiXmlAttribute attribute)

Definition at line 1702 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;
}

Here is the call graph for this function:

Here is the caller graph for this function:

const TiXmlAttribute * TiXmlAttributeSet::Find ( const char *  _name) const

Definition at line 1763 of file tinyxml.cpp.

{
  for ( const TiXmlAttribute *node = sentinel.next; node != &sentinel; node = node->next )
  {
    if ( strcmp ( node->name.c_str(), name ) == 0 )
      return node;
  }

  return 0;
}

Here is the caller graph for this function:

TiXmlAttribute* TiXmlAttributeSet::Find ( const char *  _name) [inline]

Definition at line 1189 of file tinyxml.h.

  {
    return const_cast< TiXmlAttribute * > ( (const_cast< const TiXmlAttributeSet * > (this) )->Find ( _name ) );
  }
const TiXmlAttribute* TiXmlAttributeSet::First ( ) const [inline]

Definition at line 1171 of file tinyxml.h.

  {
    return ( sentinel.next == &sentinel ) ? 0 : sentinel.next;
  }

Here is the caller graph for this function:

Definition at line 1175 of file tinyxml.h.

  {
    return ( sentinel.next == &sentinel ) ? 0 : sentinel.next;
  }
const TiXmlAttribute* TiXmlAttributeSet::Last ( ) const [inline]

Definition at line 1179 of file tinyxml.h.

  {
    return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev;
  }

Here is the caller graph for this function:

Definition at line 1183 of file tinyxml.h.

  {
    return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev;
  }
void TiXmlAttributeSet::operator= ( const TiXmlAttributeSet ) [private]

Definition at line 1717 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.
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 1208 of file tinyxml.h.


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