NCBI C++ ToolKit
|
Search Toolkit Book for xml::node_set::const_iterator
The xml::node_set::const_iterator class is used to iterate over nodes in a node set. More...
#include <misc/xmlwrapp/node_set.hpp>
Public Types | |
typedef const node | value_type |
typedef std::ptrdiff_t | difference_type |
typedef value_type * | pointer |
typedef value_type & | reference |
typedef std::forward_iterator_tag | iterator_category |
Private Member Functions | |
const_iterator (const node_set *parent, int index) | |
void | swap (const_iterator &other) |
Private Attributes | |
const node_set * | parent_ |
int | current_index_ |
Friends | |
class | node_set |
The xml::node_set::const_iterator class is used to iterate over nodes in a node set.
The iterator is one directional.
Definition at line 225 of file node_set.hpp.
typedef std::ptrdiff_t xml::node_set::const_iterator::difference_type |
Definition at line 229 of file node_set.hpp.
typedef std::forward_iterator_tag xml::node_set::const_iterator::iterator_category |
Definition at line 232 of file node_set.hpp.
Definition at line 230 of file node_set.hpp.
Definition at line 231 of file node_set.hpp.
Definition at line 228 of file node_set.hpp.
|
inline |
Create a new uninitialised xml::node_set::const_iterator object.
Definition at line 237 of file node_set.hpp.
xml::node_set::const_iterator::const_iterator | ( | const const_iterator & | other | ) |
Create a new xml::node_set::const_iterator object using another one as a template.
Definition at line 252 of file node_set.cpp.
References current_index_, and parent_.
Create a new xml::node_set::const_iterator object using another one as a template.
Definition at line 258 of file node_set.cpp.
References xml::node_set::iterator::current_index_, and xml::node_set::iterator::parent_.
|
inline |
Destroy the object.
Definition at line 270 of file node_set.hpp.
Definition at line 329 of file node_set.hpp.
|
inline |
Compare two iterators.
other | Another iterator |
Definition at line 324 of file node_set.hpp.
node_set::const_iterator::reference xml::node_set::const_iterator::operator* | ( | void | ) | const |
Provide a const reference to the node.
throws | exception if the iterator is invalid |
Definition at line 278 of file node_set.cpp.
References xml::kDerefError.
node_set::const_iterator & xml::node_set::const_iterator::operator++ | ( | void | ) |
Prefix increment.
Throws | exception if the iterator is not initialised or out of range |
Definition at line 292 of file node_set.cpp.
References xml::kAdvError.
node_set::const_iterator xml::node_set::const_iterator::operator++ | ( | int | ) |
Postfix increment.
Throws | exception if the iterator is not initialised or out of range |
Definition at line 301 of file node_set.cpp.
References tmp.
node_set::const_iterator::pointer xml::node_set::const_iterator::operator-> | ( | void | ) | const |
Provide a const pointer to the node.
throws | exception if the iterator is invalid |
Definition at line 285 of file node_set.cpp.
References xml::kRefError.
node_set::const_iterator & xml::node_set::const_iterator::operator= | ( | const const_iterator & | other | ) |
Create a copy of the xml::node_set::const_iterator object.
other | Another xml::node_set::const_iterator object |
Definition at line 264 of file node_set.cpp.
node_set::const_iterator & xml::node_set::const_iterator::operator= | ( | const iterator & | other | ) |
Create a copy of the xml::node_set::const_iterator object.
other | Another const xml::node_set::iterator object |
Definition at line 271 of file node_set.cpp.
|
inline |
Compare two iterators.
other | Another iterator |
Definition at line 312 of file node_set.hpp.
References current_index_, and parent_.
|
private |
Definition at line 308 of file node_set.cpp.
References current_index_, parent_, and swap().
|
friend |
Definition at line 337 of file node_set.hpp.
|
private |
Definition at line 335 of file node_set.hpp.
Referenced by const_iterator(), operator==(), and swap().
Definition at line 334 of file node_set.hpp.
Referenced by const_iterator(), operator==(), and swap().