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

#include <pugixml.hpp>

Public Types

enum  type_t { type_unsorted , type_sorted , type_sorted_reverse }
typedef const xpath_nodeconst_iterator
typedef const xpath_nodeiterator

Public Member Functions

 xpath_node_set ()
 xpath_node_set (const_iterator begin, const_iterator end, type_t type=type_unsorted)
 ~xpath_node_set ()
 xpath_node_set (const xpath_node_set &ns)
xpath_node_setoperator= (const xpath_node_set &ns)
type_t type () const
size_t size () const
const xpath_nodeoperator[] (size_t index) const
const_iterator begin () const
const_iterator end () const
void sort (bool reverse=false)
xpath_node first () const
bool empty () const

Detailed Description

Definition at line 1359 of file pugixml.hpp.

Member Typedef Documentation

◆ const_iterator

Definition at line 1371 of file pugixml.hpp.

◆ iterator

Definition at line 1374 of file pugixml.hpp.

Member Enumeration Documentation

◆ type_t

Enumerator
type_unsorted 
type_sorted 
type_sorted_reverse 

Definition at line 1363 of file pugixml.hpp.

1364 {
1365 type_unsorted, // Not ordered
1366 type_sorted, // Sorted by document order (ascending)
1367 type_sorted_reverse // Sorted by document order (descending)
1368 };

Constructor & Destructor Documentation

◆ xpath_node_set() [1/3]

PUGI__FN pugi::xpath_node_set::xpath_node_set ( )

Definition at line 12430 of file pugixml.cc.

12430 : _type(type_unsorted), _begin(_storage), _end(_storage)
12431 {
12432 }

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

◆ xpath_node_set() [2/3]

PUGI__FN pugi::xpath_node_set::xpath_node_set ( const_iterator begin,
const_iterator end,
type_t type = type_unsorted )

Definition at line 12434 of file pugixml.cc.

12434 : _type(type_unsorted), _begin(_storage), _end(_storage)
12435 {
12436 _assign(begin_, end_, type_);
12437 }

◆ ~xpath_node_set()

PUGI__FN pugi::xpath_node_set::~xpath_node_set ( )

Definition at line 12439 of file pugixml.cc.

12440 {
12441 if (_begin != _storage)
12442 impl::xml_memory::deallocate(_begin);
12443 }

◆ xpath_node_set() [3/3]

PUGI__FN pugi::xpath_node_set::xpath_node_set ( const xpath_node_set & ns)

Definition at line 12445 of file pugixml.cc.

12445 : _type(type_unsorted), _begin(_storage), _end(_storage)
12446 {
12447 _assign(ns._begin, ns._end, ns._type);
12448 }
#define ns(x)
Definition xmltok.c:1649

Member Function Documentation

◆ begin()

PUGI__FN xpath_node_set::const_iterator pugi::xpath_node_set::begin ( ) const

Definition at line 12499 of file pugixml.cc.

12500 {
12501 return _begin;
12502 }

◆ empty()

PUGI__FN bool pugi::xpath_node_set::empty ( ) const

Definition at line 12488 of file pugixml.cc.

12489 {
12490 return _begin == _end;
12491 }

◆ end()

PUGI__FN xpath_node_set::const_iterator pugi::xpath_node_set::end ( ) const

Definition at line 12504 of file pugixml.cc.

12505 {
12506 return _end;
12507 }

◆ first()

PUGI__FN xpath_node pugi::xpath_node_set::first ( ) const

Definition at line 12514 of file pugixml.cc.

12515 {
12516 return impl::xpath_first(_begin, _end, _type);
12517 }

◆ operator=()

PUGI__FN xpath_node_set & pugi::xpath_node_set::operator= ( const xpath_node_set & ns)

Definition at line 12450 of file pugixml.cc.

12451 {
12452 if (this == &ns) return *this;
12453
12454 _assign(ns._begin, ns._end, ns._type);
12455
12456 return *this;
12457 }

◆ operator[]()

PUGI__FN const xpath_node & pugi::xpath_node_set::operator[] ( size_t index) const

Definition at line 12493 of file pugixml.cc.

12494 {
12495 assert(index < size());
12496 return _begin[index];
12497 }
size_t size() const
Definition pugixml.cc:12483

◆ size()

PUGI__FN size_t pugi::xpath_node_set::size ( ) const

Definition at line 12483 of file pugixml.cc.

12484 {
12485 return _end - _begin;
12486 }

Referenced by operator[]().

◆ sort()

PUGI__FN void pugi::xpath_node_set::sort ( bool reverse = false)

Definition at line 12509 of file pugixml.cc.

12510 {
12511 _type = impl::xpath_sort(_begin, _end, _type, reverse);
12512 }
PUGI__FN void reverse(I begin, I end)
Definition pugixml.cc:7586

◆ type()

PUGI__FN xpath_node_set::type_t pugi::xpath_node_set::type ( ) const

Definition at line 12478 of file pugixml.cc.

12479 {
12480 return _type;
12481 }

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