Simbody  3.7
SimTK::Xml::attribute_iterator Class Reference

This is a bidirectional iterator suitable for moving forward or backward within a list of Attributes within an Element, for writable access. More...

+ Inheritance diagram for SimTK::Xml::attribute_iterator:

Public Member Functions

 attribute_iterator ()
 Default constructor creates an iterator that compares equal to attribute_end(). More...
 
 attribute_iterator (Attribute &attr)
 Construct this iterator to point to the same attribute as does the supplied Attribute handle (or attribute_end() if the handle is empty). More...
 
 attribute_iterator (const attribute_iterator &src)
 Copy constructor takes an attribute_iterator that can be const, but that still allows writing to the Attribute. More...
 
 ~attribute_iterator ()
 An iterator destructor never deletes the object to which it refers. More...
 
attribute_iteratoroperator= (const attribute_iterator &src)
 Copy assignment takes an attribute_iterator that can be const, but that still allows writing to the Attribute. More...
 
attribute_iteratoroperator++ ()
 Prefix increment operator advances the iterator to the next attribute (or attribute_end() if it was already at the last attribute) and returns a reference to the now-incremented iterator. More...
 
attribute_iterator operator++ (int)
 Postfix increment operator advances the iterator to the next attribute (or attribute_end() if it was already at the last attribute) and returns an iterator still referencing the previous one. More...
 
attribute_iteratoroperator-- ()
 Prefix decrement operator moves the iterator to the previous attribute (or attribute_end() if it was already at the first attribute) and returns a reference to the now-decremented iterator. More...
 
attribute_iterator operator-- (int)
 Postfix decrement operator moves the iterator to the previous attribute (or attribute_end() if it was already at the first attribute) and returns an iterator still referencing the original one. More...
 
Attributeoperator* () const
 Return a writable reference to the Attribute referenced by this iterator; the handle will be invalid if the iterator was attribute_end(). More...
 
Attributeoperator-> () const
 Return a writable pointer to the Attribute referenced by this iterator; the pointer will never be null but the handle it points to will be invalid if the iterator was attribute_end(). More...
 
bool operator== (const attribute_iterator &other) const
 Comparison return true only if both iterators refer to the same in-memory attribute or both are at attribute_end(); iterators referencing two different attributes that happen to have identical properties will not test equal by these criteria. More...
 
bool operator!= (const attribute_iterator &other) const
 Uses same criteria as operator==(). More...
 

Friends

class Element
 

Detailed Description

This is a bidirectional iterator suitable for moving forward or backward within a list of Attributes within an Element, for writable access.

Constructor & Destructor Documentation

◆ attribute_iterator() [1/3]

SimTK::Xml::attribute_iterator::attribute_iterator ( )
inline

Default constructor creates an iterator that compares equal to attribute_end().

◆ attribute_iterator() [2/3]

SimTK::Xml::attribute_iterator::attribute_iterator ( Attribute attr)
inlineexplicit

Construct this iterator to point to the same attribute as does the supplied Attribute handle (or attribute_end() if the handle is empty).

◆ attribute_iterator() [3/3]

SimTK::Xml::attribute_iterator::attribute_iterator ( const attribute_iterator src)
inline

Copy constructor takes an attribute_iterator that can be const, but that still allows writing to the Attribute.

◆ ~attribute_iterator()

SimTK::Xml::attribute_iterator::~attribute_iterator ( )
inline

An iterator destructor never deletes the object to which it refers.

Member Function Documentation

◆ operator=()

attribute_iterator& SimTK::Xml::attribute_iterator::operator= ( const attribute_iterator src)
inline

Copy assignment takes an attribute_iterator that can be const, but that still allows writing to the Attribute.

◆ operator++() [1/2]

attribute_iterator& SimTK::Xml::attribute_iterator::operator++ ( )

Prefix increment operator advances the iterator to the next attribute (or attribute_end() if it was already at the last attribute) and returns a reference to the now-incremented iterator.

◆ operator++() [2/2]

attribute_iterator SimTK::Xml::attribute_iterator::operator++ ( int  )

Postfix increment operator advances the iterator to the next attribute (or attribute_end() if it was already at the last attribute) and returns an iterator still referencing the previous one.

◆ operator--() [1/2]

attribute_iterator& SimTK::Xml::attribute_iterator::operator-- ( )

Prefix decrement operator moves the iterator to the previous attribute (or attribute_end() if it was already at the first attribute) and returns a reference to the now-decremented iterator.

◆ operator--() [2/2]

attribute_iterator SimTK::Xml::attribute_iterator::operator-- ( int  )

Postfix decrement operator moves the iterator to the previous attribute (or attribute_end() if it was already at the first attribute) and returns an iterator still referencing the original one.

◆ operator*()

Attribute& SimTK::Xml::attribute_iterator::operator* ( ) const
inline

Return a writable reference to the Attribute referenced by this iterator; the handle will be invalid if the iterator was attribute_end().

◆ operator->()

Attribute* SimTK::Xml::attribute_iterator::operator-> ( ) const
inline

Return a writable pointer to the Attribute referenced by this iterator; the pointer will never be null but the handle it points to will be invalid if the iterator was attribute_end().

◆ operator==()

bool SimTK::Xml::attribute_iterator::operator== ( const attribute_iterator other) const
inline

Comparison return true only if both iterators refer to the same in-memory attribute or both are at attribute_end(); iterators referencing two different attributes that happen to have identical properties will not test equal by these criteria.

◆ operator!=()

bool SimTK::Xml::attribute_iterator::operator!= ( const attribute_iterator other) const
inline

Uses same criteria as operator==().

Friends And Related Function Documentation

◆ Element

friend class Element
friend

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