DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Types | Public Member Functions | Public Attributes | List of all members
dd4hep::json::NodeList Class Reference

Class describing a list of JSON nodes. More...

#include <Elements.h>

Public Types

typedef std::pair< JsonElement::second_type::assoc_iterator, JsonElement::second_type::assoc_iterator > iter_t
 

Public Member Functions

 NodeList (const NodeList &l)
 Copy constructor. More...
 
 NodeList (JsonElement *frst, const std::string &tag)
 Initializing constructor. More...
 
 ~NodeList ()
 Default destructor. More...
 
JsonElementreset ()
 Reset the nodelist - e.g. restart iteration from beginning. More...
 
JsonElementnext () const
 Advance to next element. More...
 
JsonElementprevious () const
 Go back to previous element. More...
 
NodeListoperator= (const NodeList &l)
 Assignment operator. More...
 

Public Attributes

std::string m_tag
 
JsonElementm_node
 
iter_t m_ptr
 

Detailed Description

Class describing a list of JSON nodes.

Definition of a "list" of json elements hanging of the parent. The list allows iterations, which can be restarted. Please not: Copies are not entirely free, since the string tag need to be replicated using strdup/free (or when using xerces the corresponding unicode routines).

Author
M.Frank
Version
1.0

Definition at line 103 of file Elements.h.

Member Typedef Documentation

◆ iter_t

typedef std::pair<JsonElement::second_type::assoc_iterator,JsonElement::second_type::assoc_iterator> dd4hep::json::NodeList::iter_t

Definition at line 105 of file Elements.h.

Constructor & Destructor Documentation

◆ NodeList() [1/2]

NodeList::NodeList ( const NodeList l)

Copy constructor.

Definition at line 189 of file Elements.cpp.

◆ NodeList() [2/2]

NodeList::NodeList ( JsonElement frst,
const std::string &  tag 
)

Initializing constructor.

Definition at line 196 of file Elements.cpp.

◆ ~NodeList()

NodeList::~NodeList ( )

Default destructor.

Definition at line 203 of file Elements.cpp.

Member Function Documentation

◆ next()

JsonElement * NodeList::next ( ) const

Advance to next element.

Definition at line 218 of file Elements.cpp.

◆ operator=()

NodeList & NodeList::operator= ( const NodeList l)

Assignment operator.

Definition at line 236 of file Elements.cpp.

◆ previous()

JsonElement * NodeList::previous ( ) const

Go back to previous element.

Definition at line 227 of file Elements.cpp.

◆ reset()

JsonElement * NodeList::reset ( )

Reset the nodelist - e.g. restart iteration from beginning.

Reset the nodelist.

Definition at line 207 of file Elements.cpp.

Member Data Documentation

◆ m_node

JsonElement* dd4hep::json::NodeList::m_node

Definition at line 107 of file Elements.h.

◆ m_ptr

iter_t dd4hep::json::NodeList::m_ptr
mutable

Definition at line 108 of file Elements.h.

◆ m_tag

std::string dd4hep::json::NodeList::m_tag

Definition at line 106 of file Elements.h.


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