Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
pugi::xml_named_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_named_node_iterator ()
 xml_named_node_iterator (const xml_node &node, const char_t *name)
bool operator== (const xml_named_node_iterator &rhs) const
bool operator!= (const xml_named_node_iterator &rhs) const
xml_nodeoperator* () const
xml_nodeoperator-> () const
xml_named_node_iteratoroperator++ ()
xml_named_node_iterator operator++ (int)
xml_named_node_iteratoroperator-- ()
xml_named_node_iterator operator-- (int)

Friends

class xml_node

Detailed Description

Definition at line 911 of file pugixml.hpp.

Member Typedef Documentation

◆ difference_type

Definition at line 917 of file pugixml.hpp.

◆ iterator_category

typedef std::bidirectional_iterator_tag pugi::xml_named_node_iterator::iterator_category

Definition at line 923 of file pugixml.hpp.

◆ pointer

Definition at line 919 of file pugixml.hpp.

◆ reference

Definition at line 920 of file pugixml.hpp.

◆ value_type

Constructor & Destructor Documentation

◆ xml_named_node_iterator() [1/2]

PUGI__FN pugi::xml_named_node_iterator::xml_named_node_iterator ( )

Definition at line 6958 of file pugixml.cc.

6958 : _name(0)
6959 {
6960 }

Referenced by operator!=(), operator++(), operator++(), operator--(), operator--(), and operator==().

◆ xml_named_node_iterator() [2/2]

PUGI__FN pugi::xml_named_node_iterator::xml_named_node_iterator ( const xml_node & node,
const char_t * name )

Definition at line 6962 of file pugixml.cc.

6962 : _wrap(node), _parent(node.parent()), _name(name)
6963 {
6964 }

Member Function Documentation

◆ operator!=()

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

Definition at line 6975 of file pugixml.cc.

6976 {
6977 return _wrap._root != rhs._wrap._root || _parent._root != rhs._parent._root;
6978 }

◆ operator*()

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

Definition at line 6980 of file pugixml.cc.

6981 {
6982 assert(_wrap._root);
6983 return _wrap;
6984 }

◆ operator++() [1/2]

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

Definition at line 6992 of file pugixml.cc.

6993 {
6994 assert(_wrap._root);
6995 _wrap = _wrap.next_sibling(_name);
6996 return *this;
6997 }

◆ operator++() [2/2]

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

Definition at line 6999 of file pugixml.cc.

7000 {
7001 xml_named_node_iterator temp = *this;
7002 ++*this;
7003 return temp;
7004 }

◆ operator--() [1/2]

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

Definition at line 7006 of file pugixml.cc.

7007 {
7008 if (_wrap._root)
7009 _wrap = _wrap.previous_sibling(_name);
7010 else
7011 {
7012 _wrap = _parent.last_child();
7013
7014 if (!impl::strequal(_wrap.name(), _name))
7015 _wrap = _wrap.previous_sibling(_name);
7016 }
7017
7018 return *this;
7019 }

◆ operator--() [2/2]

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

Definition at line 7021 of file pugixml.cc.

7022 {
7023 xml_named_node_iterator temp = *this;
7024 --*this;
7025 return temp;
7026 }

◆ operator->()

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

Definition at line 6986 of file pugixml.cc.

6987 {
6988 assert(_wrap._root);
6989 return const_cast<xml_node*>(&_wrap); // BCC5 workaround
6990 }

◆ operator==()

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

Definition at line 6970 of file pugixml.cc.

6971 {
6972 return _wrap._root == rhs._wrap._root && _parent._root == rhs._parent._root;
6973 }

◆ xml_node

friend class xml_node
friend

Definition at line 913 of file pugixml.hpp.

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


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