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

#include <pugixml.hpp>

Public Member Functions

 xpath_node ()
 xpath_node (const xml_node &node)
 xpath_node (const xml_attribute &attribute, const xml_node &parent)
xml_node node () const
xml_attribute attribute () const
xml_node parent () const
 operator unspecified_bool_type () const
bool operator! () const
bool operator== (const xpath_node &n) const
bool operator!= (const xpath_node &n) const

Detailed Description

Definition at line 1318 of file pugixml.hpp.

Constructor & Destructor Documentation

◆ xpath_node() [1/3]

PUGI__FN pugi::xpath_node::xpath_node ( )

Definition at line 12322 of file pugixml.cc.

12323 {
12324 }

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

◆ xpath_node() [2/3]

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

Definition at line 12326 of file pugixml.cc.

12326 : _node(node_)
12327 {
12328 }

◆ xpath_node() [3/3]

PUGI__FN pugi::xpath_node::xpath_node ( const xml_attribute & attribute,
const xml_node & parent )

Definition at line 12330 of file pugixml.cc.

12330 : _node(attribute_ ? parent_ : xml_node()), _attribute(attribute_)
12331 {
12332 }

Member Function Documentation

◆ attribute()

PUGI__FN xml_attribute pugi::xpath_node::attribute ( ) const

Definition at line 12339 of file pugixml.cc.

12340 {
12341 return _attribute;
12342 }

◆ node()

PUGI__FN xml_node pugi::xpath_node::node ( ) const

Definition at line 12334 of file pugixml.cc.

12335 {
12336 return _attribute ? xml_node() : _node;
12337 }

◆ operator unspecified_bool_type()

PUGI__FN pugi::xpath_node::operator xpath_node::unspecified_bool_type ( ) const

Definition at line 12353 of file pugixml.cc.

12354 {
12355 return (_node || _attribute) ? unspecified_bool_xpath_node : 0;
12356 }

◆ operator!()

PUGI__FN bool pugi::xpath_node::operator! ( ) const

Definition at line 12358 of file pugixml.cc.

12359 {
12360 return !(_node || _attribute);
12361 }

◆ operator!=()

Definition at line 12368 of file pugixml.cc.

12369 {
12370 return _node != n._node || _attribute != n._attribute;
12371 }

◆ operator==()

PUGI__FN bool pugi::xpath_node::operator== ( const xpath_node & n) const

Definition at line 12363 of file pugixml.cc.

12364 {
12365 return _node == n._node && _attribute == n._attribute;
12366 }

◆ parent()

PUGI__FN xml_node pugi::xpath_node::parent ( ) const

Definition at line 12344 of file pugixml.cc.

12345 {
12346 return _attribute ? _node : _node.parent();
12347 }

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