Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
pugi::xml_node_iterator Class Reference

#include <pugixml.hpp>

Public Types

typedef ptrdiff_t difference_type
typedef xml_node value_type
typedef xml_nodepointer
typedef xml_nodereference
typedef std::bidirectional_iterator_tag iterator_category

Public Member Functions

 xml_node_iterator ()
 xml_node_iterator (const xml_node &node)
bool operator== (const xml_node_iterator &rhs) const
bool operator!= (const xml_node_iterator &rhs) const
xml_nodeoperator* () const
xml_nodeoperator-> () const
xml_node_iterator & operator++ ()
xml_node_iterator operator++ (int)
xml_node_iterator & operator-- ()
xml_node_iterator operator-- (int)

Friends

class xml_node

Detailed Description

Definition at line 827 of file pugixml.hpp.

Member Typedef Documentation

◆ difference_type

Definition at line 839 of file pugixml.hpp.

◆ iterator_category

typedef std::bidirectional_iterator_tag pugi::xml_node_iterator::iterator_category

Definition at line 845 of file pugixml.hpp.

◆ pointer

Definition at line 841 of file pugixml.hpp.

◆ reference

Definition at line 842 of file pugixml.hpp.

◆ value_type

Definition at line 840 of file pugixml.hpp.

Constructor & Destructor Documentation

◆ xml_node_iterator() [1/2]

PUGI__FN pugi::xml_node_iterator::xml_node_iterator ( )

Definition at line 6836 of file pugixml.cc.

6837 {
6838 }

◆ xml_node_iterator() [2/2]

PUGI__FN pugi::xml_node_iterator::xml_node_iterator ( const xml_node & node)

Definition at line 6840 of file pugixml.cc.

6840 : _wrap(node), _parent(node.parent())
6841 {
6842 }

Member Function Documentation

◆ operator!=()

PUGI__FN bool pugi::xml_node_iterator::operator!= ( const xml_node_iterator & rhs) const

Definition at line 6853 of file pugixml.cc.

6854 {
6855 return _wrap._root != rhs._wrap._root || _parent._root != rhs._parent._root;
6856 }

◆ operator*()

PUGI__FN xml_node & pugi::xml_node_iterator::operator* ( ) const

Definition at line 6858 of file pugixml.cc.

6859 {
6860 assert(_wrap._root);
6861 return _wrap;
6862 }

◆ operator++() [1/2]

PUGI__FN xml_node_iterator & pugi::xml_node_iterator::operator++ ( )

Definition at line 6870 of file pugixml.cc.

6871 {
6872 assert(_wrap._root);
6873 _wrap._root = _wrap._root->next_sibling;
6874 return *this;
6875 }

◆ operator++() [2/2]

PUGI__FN xml_node_iterator pugi::xml_node_iterator::operator++ ( int )

Definition at line 6877 of file pugixml.cc.

6878 {
6879 xml_node_iterator temp = *this;
6880 ++*this;
6881 return temp;
6882 }

◆ operator--() [1/2]

PUGI__FN xml_node_iterator & pugi::xml_node_iterator::operator-- ( )

Definition at line 6884 of file pugixml.cc.

6885 {
6886 _wrap = _wrap._root ? _wrap.previous_sibling() : _parent.last_child();
6887 return *this;
6888 }

◆ operator--() [2/2]

PUGI__FN xml_node_iterator pugi::xml_node_iterator::operator-- ( int )

Definition at line 6890 of file pugixml.cc.

6891 {
6892 xml_node_iterator temp = *this;
6893 --*this;
6894 return temp;
6895 }

◆ operator->()

PUGI__FN xml_node * pugi::xml_node_iterator::operator-> ( ) const

Definition at line 6864 of file pugixml.cc.

6865 {
6866 assert(_wrap._root);
6867 return const_cast<xml_node*>(&_wrap); // BCC5 workaround
6868 }
friend class xml_node
Definition pugixml.hpp:829

◆ operator==()

PUGI__FN bool pugi::xml_node_iterator::operator== ( const xml_node_iterator & rhs) const

Definition at line 6848 of file pugixml.cc.

6849 {
6850 return _wrap._root == rhs._wrap._root && _parent._root == rhs._parent._root;
6851 }

◆ xml_node

friend class xml_node
friend

Definition at line 829 of file pugixml.hpp.

Referenced by operator*(), operator->(), xml_node, and xml_node_iterator().


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