Simbody
|
This is a bidirectional iterator suitable for moving forward or backward within a list of Attributes within an Element, for writable access. More...
#include <Xml.h>
Public Member Functions | |
attribute_iterator () | |
Default constructor creates an iterator that compares equal to attribute_end(). | |
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). | |
attribute_iterator (const attribute_iterator &src) | |
Copy constructor takes an attribute_iterator that can be const, but that still allows writing to the Attribute. | |
~attribute_iterator () | |
An iterator destructor never deletes the object to which it refers. | |
attribute_iterator & | operator= (const attribute_iterator &src) |
Copy assignment takes an attribute_iterator that can be const, but that still allows writing to the Attribute. | |
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. | |
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. | |
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. | |
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. | |
Attribute & | operator* () const |
Return a writable reference to the Attribute referenced by this iterator; the handle will be invalid if the iterator was attribute_end(). | |
Attribute * | operator-> () 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(). | |
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. | |
bool | operator!= (const attribute_iterator &other) const |
Uses same criteria as operator==(). | |
Friends | |
class | Xml::Element |
This is a bidirectional iterator suitable for moving forward or backward within a list of Attributes within an Element, for writable access.
SimTK::Xml::attribute_iterator::attribute_iterator | ( | ) | [inline] |
Default constructor creates an iterator that compares equal to attribute_end().
SimTK::Xml::attribute_iterator::attribute_iterator | ( | Attribute & | attr | ) | [inline, explicit] |
Construct this iterator to point to the same attribute as does the supplied Attribute handle (or attribute_end() if the handle is empty).
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.
SimTK::Xml::attribute_iterator::~attribute_iterator | ( | ) | [inline] |
An iterator destructor never deletes the object to which it refers.
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.
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.
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.
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.
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.
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().
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().
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.
bool SimTK::Xml::attribute_iterator::operator!= | ( | const attribute_iterator & | other | ) | const [inline] |
Uses same criteria as operator==().
friend class Xml::Element [friend] |