ome-common  5.5.0
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
ome::common::xml::dom::NodeList::iterator Class Reference

Iterator for a NodeList. More...

#include <ome/common/xml/dom/NodeList.h>

Public Member Functions

 iterator (const iterator &rhs)
 Copy construct an iterator. More...
 
 ~iterator ()
 Destructor.
 
Nodeoperator* ()
 Dereference the iterator. More...
 
Nodeoperator-> ()
 Dereference the iterator. More...
 
iteratoroperator-- ()
 Move the iterator backward one element. More...
 
iteratoroperator++ ()
 Move the iterator forward one element. More...
 
bool operator== (const iterator &rhs) const
 Check the equality of two iterators. More...
 
bool operator!= (const iterator &rhs) const
 Check the non-equality of two iterators. More...
 

Private Member Functions

 iterator ()
 Construct a null iterator. More...
 
 iterator (xercesc::DOMNodeList *xmlnodelist, size_type index)
 Construct an iterator at the specified position for the specified list. More...
 

Private Attributes

size_type index
 Index into the list.
 
xercesc::DOMNodeList * xmlnodelist
 List being iterated over.
 
std::shared_ptr< Nodexmlnode
 Node at current position.
 

Friends

class NodeList
 Other specializations of this template are friends.
 

Detailed Description

Iterator for a NodeList.

Constructor & Destructor Documentation

◆ iterator() [1/3]

ome::common::xml::dom::NodeList::iterator::iterator ( )
private

Construct a null iterator.

This is used to refer to invalid positions such as past-the-end.

Referenced by ome::common::xml::dom::NodeList::begin(), and ome::common::xml::dom::NodeList::end().

+ Here is the caller graph for this function:

◆ iterator() [2/3]

ome::common::xml::dom::NodeList::iterator::iterator ( xercesc::DOMNodeList *  xmlnodelist,
size_type  index 
)
private

Construct an iterator at the specified position for the specified list.

Parameters
xmlnodelistthe NodeList to iterate over.
indexthe index into the NodeList.

◆ iterator() [3/3]

ome::common::xml::dom::NodeList::iterator::iterator ( const iterator rhs)

Copy construct an iterator.

Parameters
rhsthe iterator to copy.

Member Function Documentation

◆ operator!=()

bool ome::common::xml::dom::NodeList::iterator::operator!= ( const iterator rhs) const
inline

Check the non-equality of two iterators.

Parameters
rhsthe iterator to compare with.
Returns
true if not equal, otherwise false.

◆ operator*()

Node & ome::common::xml::dom::NodeList::iterator::operator* ( )

Dereference the iterator.

Returns
a reference to the Node at this position.

References xmlnode.

◆ operator++()

NodeList::iterator & ome::common::xml::dom::NodeList::iterator::operator++ ( )

Move the iterator forward one element.

Returns
the iterator at the new position.

References index, xmlnode, and xmlnodelist.

◆ operator--()

NodeList::iterator & ome::common::xml::dom::NodeList::iterator::operator-- ( )

Move the iterator backward one element.

Returns
the iterator at the new position.

References index, xmlnode, and xmlnodelist.

◆ operator->()

Node * ome::common::xml::dom::NodeList::iterator::operator-> ( )

Dereference the iterator.

Returns
a pointer to the Node at this position.

References xmlnode.

◆ operator==()

bool ome::common::xml::dom::NodeList::iterator::operator== ( const iterator rhs) const

Check the equality of two iterators.

Parameters
rhsthe iterator to compare with.
Returns
true if equal, otherwise false.

References index, and xmlnode.


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