Simbody
Public Member Functions | Friends

SimTK::Xml::element_iterator Class Reference

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

#include <Xml.h>

Inheritance diagram for SimTK::Xml::element_iterator:

List of all members.

Public Member Functions

 element_iterator (const String &tag="")
 This is the default constructor which leaves the element_iterator empty, and you can optionally set the type of Element which will be iterated over.
 element_iterator (Element &elt, const String &tag="")
 Constructor an element_iterator pointing to a given Element, and optionally set the type of Element which will be iterated over.
 element_iterator (const element_iterator &src)
 Copy constructor takes an element_iterator that can be const, but that still allows writing to the Element.
element_iteratoroperator= (const element_iterator &src)
 Copy assignment takes an element_iterator that can be const, but that still allows writing to the Element.
element_iteratoroperator++ ()
element_iterator operator++ (int)
element_iteratoroperator-- ()
element_iterator operator-- (int)
Elementoperator* () const
Elementoperator-> () const
bool operator== (const element_iterator &other) const
bool operator!= (const element_iterator &other) const

Friends

class Xml
class Xml::Element

Detailed Description

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

By default we will iterate over all elements in a list but you can restrict the element_iterator at construction to find only elements with a particular tag.


Constructor & Destructor Documentation

SimTK::Xml::element_iterator::element_iterator ( const String tag = "") [inline, explicit]

This is the default constructor which leaves the element_iterator empty, and you can optionally set the type of Element which will be iterated over.

SimTK::Xml::element_iterator::element_iterator ( Xml::Element elt,
const String tag = "" 
) [inline, explicit]

Constructor an element_iterator pointing to a given Element, and optionally set the type of Element which will be iterated over.

SimTK::Xml::element_iterator::element_iterator ( const element_iterator src) [inline]

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


Member Function Documentation

element_iterator& SimTK::Xml::element_iterator::operator= ( const element_iterator src) [inline]

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

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

Reimplemented from SimTK::Xml::node_iterator.

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

Reimplemented from SimTK::Xml::node_iterator.

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

Reimplemented from SimTK::Xml::node_iterator.

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

Reimplemented from SimTK::Xml::node_iterator.

Xml::Element & SimTK::Xml::element_iterator::operator* ( ) const [inline]

Reimplemented from SimTK::Xml::node_iterator.

Xml::Element * SimTK::Xml::element_iterator::operator-> ( ) const [inline]

Reimplemented from SimTK::Xml::node_iterator.

bool SimTK::Xml::element_iterator::operator== ( const element_iterator other) const [inline]
bool SimTK::Xml::element_iterator::operator!= ( const element_iterator other) const [inline]

Friends And Related Function Documentation

friend class Xml [friend]

Reimplemented from SimTK::Xml::node_iterator.

friend class Xml::Element [friend]

Reimplemented from SimTK::Xml::node_iterator.


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