NCBI C++ ToolKit
|
Search Toolkit Book for xml::node_set::iterator
The xml::node_set::iterator class is used to iterate over nodes in a node set. More...
#include <misc/xmlwrapp/node_set.hpp>
Public Types | |
typedef node | value_type |
typedef std::ptrdiff_t | difference_type |
typedef value_type * | pointer |
typedef value_type & | reference |
typedef std::forward_iterator_tag | iterator_category |
Public Member Functions | |
iterator () | |
Create a new uninitialised xml::node_set::iterator object. More... | |
iterator (const iterator &other) | |
Create a new xml::node_set::iterator object using another one as a template. More... | |
iterator & | operator= (const iterator &other) |
Create a copy of the xml::node_set::iterator object. More... | |
~iterator () | |
Destroy the object. More... | |
reference | operator* () const |
Provide a reference to the node. More... | |
pointer | operator-> () const |
Provide a pointer to the node. More... | |
iterator & | operator++ () |
Prefix increment. More... | |
iterator | operator++ (int) |
Postfix increment. More... | |
bool | operator== (const iterator &other) const |
Compare two iterators. More... | |
bool | operator!= (const iterator &other) const |
Compare two iterators. More... | |
Private Member Functions | |
iterator (node_set *parent, int index) | |
void | swap (iterator &other) |
Private Attributes | |
node_set * | parent_ |
int | current_index_ |
Friends | |
class | node_set |
class | const_iterator |
The xml::node_set::iterator class is used to iterate over nodes in a node set.
The iterator is one directional.
Definition at line 119 of file node_set.hpp.
typedef std::ptrdiff_t xml::node_set::iterator::difference_type |
Definition at line 123 of file node_set.hpp.
typedef std::forward_iterator_tag xml::node_set::iterator::iterator_category |
Definition at line 126 of file node_set.hpp.
Definition at line 124 of file node_set.hpp.
Definition at line 125 of file node_set.hpp.
Definition at line 122 of file node_set.hpp.
|
inline |
Create a new uninitialised xml::node_set::iterator object.
Definition at line 131 of file node_set.hpp.
Create a new xml::node_set::iterator object using another one as a template.
Definition at line 199 of file node_set.cpp.
References current_index_, and parent_.
|
inline |
Destroy the object.
Definition at line 150 of file node_set.hpp.
Definition at line 209 of file node_set.hpp.
Compare two iterators.
other | Another iterator |
Definition at line 204 of file node_set.hpp.
node_set::iterator::reference xml::node_set::iterator::operator* | ( | void | ) | const |
Provide a reference to the node.
throws | exception if the iterator is invalid |
Definition at line 212 of file node_set.cpp.
References xml::kDerefError.
node_set::iterator & xml::node_set::iterator::operator++ | ( | void | ) |
Prefix increment.
Throws | exception if the iterator is not initialised or out of range |
Definition at line 226 of file node_set.cpp.
References xml::kAdvError.
node_set::iterator xml::node_set::iterator::operator++ | ( | int | ) |
Postfix increment.
Throws | exception if the iterator is not initialised or out of range |
Definition at line 235 of file node_set.cpp.
References tmp.
node_set::iterator::pointer xml::node_set::iterator::operator-> | ( | void | ) | const |
Provide a pointer to the node.
throws | exception if the iterator is invalid |
Definition at line 219 of file node_set.cpp.
References xml::kRefError.
node_set::iterator & xml::node_set::iterator::operator= | ( | const iterator & | other | ) |
Create a copy of the xml::node_set::iterator object.
other | Another xml::node_set::iterator object |
Definition at line 205 of file node_set.cpp.
Compare two iterators.
other | Another iterator |
Definition at line 192 of file node_set.hpp.
References current_index_, and parent_.
|
private |
Definition at line 242 of file node_set.cpp.
References current_index_, parent_, and swap().
|
friend |
Definition at line 218 of file node_set.hpp.
|
friend |
Definition at line 217 of file node_set.hpp.
|
private |
Definition at line 215 of file node_set.hpp.
Referenced by xml::node_set::const_iterator::const_iterator(), iterator(), operator==(), and swap().
|
private |
Definition at line 214 of file node_set.hpp.
Referenced by xml::node_set::const_iterator::const_iterator(), iterator(), operator==(), and swap().