osgEarth 2.1.1
Public Member Functions | Private Member Functions | Private Attributes

TiXmlAttributeSet Class Reference

#include <tinyxml.h>

Collaboration diagram for TiXmlAttributeSet:

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 ()
TiXmlAttributeFind (const char *_name) const
TiXmlAttributeFindOrCreate (const char *_name)

Private Member Functions

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

Private Attributes

TiXmlAttribute sentinel

Detailed Description

Definition at line 903 of file tinyxml.h.


Constructor & Destructor Documentation

TiXmlAttributeSet::TiXmlAttributeSet ( )

Definition at line 1453 of file tinyxml.cpp.

TiXmlAttributeSet::~TiXmlAttributeSet ( )

Definition at line 1460 of file tinyxml.cpp.

{
        assert( sentinel.next == &sentinel );
        assert( sentinel.prev == &sentinel );
}
TiXmlAttributeSet::TiXmlAttributeSet ( const TiXmlAttributeSet ) [private]

Member Function Documentation

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;
}

Here is the call graph for this function:

Here is the caller graph for this function:

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;
}

Here is the caller graph for this function:

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;
}

Here is the call graph for this function:

Here is the caller graph for this function:

TiXmlAttribute* TiXmlAttributeSet::First ( ) [inline]

Definition at line 913 of file tinyxml.h.

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

Definition at line 912 of file tinyxml.h.

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

Here is the caller graph for this function:

const TiXmlAttribute* TiXmlAttributeSet::Last ( ) const [inline]

Definition at line 914 of file tinyxml.h.

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

Here is the caller graph for this function:

TiXmlAttribute* TiXmlAttributeSet::Last ( ) [inline]

Definition at line 915 of file tinyxml.h.

{ return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; }
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.
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 932 of file tinyxml.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines