DABC (Data Acquisition Backbone Core)  2.9.9
Public Member Functions | Static Public Member Functions | Protected Attributes
dabc::Iterator Class Reference

Iterator over objects hierarchy More...

#include <dabc/Iterator.h>

Public Member Functions

Objectcurrent () const
const char * fullname () const
 Iterator (Object *topfolder, int maxlevel=-1)
 Iterator (Reference ref, int maxlevel=-1)
 Limit how deep iterator allowed to go inside hierarchy. More...
unsigned level () const
const char * name () const
Objectnext (bool goinside=true)
template<class T >
bool next_cast (T *&ptr, bool goinside=true)
Objectparent (unsigned lvl)
 Returns parents of current object. More...
Reference ref () const
virtual ~Iterator ()

Static Public Member Functions

static void PrintHieararchy (Reference ref)

Protected Attributes

Reference fCurrent
ReferencesVector fFolders
std::string fFullName
std::vector< unsigned > fIndexes
int fMaxLevel
Reference fTop

Detailed Description

Iterator over objects hierarchy

Definition at line 36 of file Iterator.h.

Constructor & Destructor Documentation

◆ Iterator() [1/2]

dabc::Iterator::Iterator ( Reference  ref,
int  maxlevel = -1 

Limit how deep iterator allowed to go inside hierarchy.

Definition at line 20 of file Iterator.cxx.

◆ Iterator() [2/2]

dabc::Iterator::Iterator ( Object topfolder,
int  maxlevel = -1 

Definition at line 30 of file Iterator.cxx.

◆ ~Iterator()

dabc::Iterator::~Iterator ( )

Definition at line 40 of file Iterator.cxx.

Member Function Documentation

◆ next()

dabc::Object * dabc::Iterator::next ( bool  goinside = true)

Definition at line 44 of file Iterator.cxx.

◆ current()

Object* dabc::Iterator::current ( ) const

Definition at line 49 of file Iterator.h.

◆ ref()

Reference dabc::Iterator::ref ( ) const

Definition at line 50 of file Iterator.h.

◆ level()

unsigned dabc::Iterator::level ( ) const

Definition at line 51 of file Iterator.h.

◆ parent()

dabc::Object * dabc::Iterator::parent ( unsigned  lvl)

Returns parents of current object.

[in]lvl- level of parent, 0 - top-level folder, 1 - first-level folder and so on
pointer on parent object

Definition at line 91 of file Iterator.cxx.

◆ fullname()

const char* dabc::Iterator::fullname ( ) const

Definition at line 56 of file Iterator.h.

◆ name()

const char* dabc::Iterator::name ( ) const

Definition at line 57 of file Iterator.h.

◆ next_cast()

template<class T >
bool dabc::Iterator::next_cast ( T *&  ptr,
bool  goinside = true 

Definition at line 60 of file Iterator.h.

◆ PrintHieararchy()

void dabc::Iterator::PrintHieararchy ( Reference  ref)

Definition at line 97 of file Iterator.cxx.

Field Documentation

◆ fTop

Reference dabc::Iterator::fTop

Definition at line 38 of file Iterator.h.

◆ fCurrent

Reference dabc::Iterator::fCurrent

Definition at line 39 of file Iterator.h.

◆ fIndexes

std::vector<unsigned> dabc::Iterator::fIndexes

Definition at line 40 of file Iterator.h.

◆ fFolders

ReferencesVector dabc::Iterator::fFolders

Definition at line 41 of file Iterator.h.

◆ fFullName

std::string dabc::Iterator::fFullName

Definition at line 42 of file Iterator.h.

◆ fMaxLevel

int dabc::Iterator::fMaxLevel

Definition at line 43 of file Iterator.h.

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