Jpp  debug
the software that should make you happy
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
JSUPPORT::JAutoTreeScanner< JBase_t, JEvaluator_t > Struct Template Reference

Auxiliary class to select JTreeScanner based on ROOT class name. More...

#include <JAutoTreeScanner.hh>

Inheritance diagram for JSUPPORT::JAutoTreeScanner< JBase_t, JEvaluator_t >:
JTOOLS::JAutoMap< JKey_t, JValue_t > std::map< JKey_t, JValue_t >

Classes

struct  JElement_t
 Auxiliary class for element insertion. More...
 

Public Types

typedef JAutoMap< std::string, JSinglePointer< JTreeScannerInterface< JBase_t, JEvaluator_t > > >::map_type map_type
 
typedef JAutoMap< std::string, JSinglePointer< JTreeScannerInterface< JBase_t, JEvaluator_t > > >::value_type value_type
 
typedef map_type::const_iterator const_iterator
 
typedef map_type::iterator iterator
 
typedef map_type::const_reverse_iterator const_reverse_iterator
 
typedef map_type::reverse_iterator reverse_iterator
 

Public Member Functions

 JAutoTreeScanner ()
 Default constructor. More...
 
template<class T >
 JAutoTreeScanner (JType< T > type, const bool option=false)
 Constructor. More...
 
bool getOption () const
 Get option to include name space. More...
 
template<class T >
void insert ()
 Insert list of data types. More...
 
template<class T , class JElement_t >
void insert (const JAutomate< JElement_t > &automate)
 Insert list of data types. More...
 

Static Public Member Functions

template<class T >
static value_type getAutoElement (JType< T > type)
 Creation of a map element for given data type. More...
 

Protected Member Functions

template<class T , class JElement_t >
void insert (JType< T > type, const JAutomate< JElement_t > &automate)
 Insertion of single data type. More...
 
template<class JHead_t , class JTail_t , class JElement_t >
void insert (JType< JTypeList< JHead_t, JTail_t > > typelist, const JAutomate< JElement_t > &automate)
 Recursive insertion of data types. More...
 
template<class JElement_t >
void insert (JType< JNullType > type, const JAutomate< JElement_t > &automate)
 Template specialisation to terminate insertion of data types. More...
 

Private Attributes

bool option
 include namespace More...
 

Detailed Description

template<class JBase_t, class JEvaluator_t = JNullType>
struct JSUPPORT::JAutoTreeScanner< JBase_t, JEvaluator_t >

Auxiliary class to select JTreeScanner based on ROOT class name.

Definition at line 34 of file JAutoTreeScanner.hh.

Member Typedef Documentation

◆ map_type

template<class JBase_t , class JEvaluator_t = JNullType>
typedef JAutoMap<std::string, JSinglePointer< JTreeScannerInterface<JBase_t, JEvaluator_t> > >::map_type JSUPPORT::JAutoTreeScanner< JBase_t, JEvaluator_t >::map_type

Definition at line 37 of file JAutoTreeScanner.hh.

◆ value_type

template<class JBase_t , class JEvaluator_t = JNullType>
typedef JAutoMap<std::string, JSinglePointer< JTreeScannerInterface<JBase_t, JEvaluator_t> > >::value_type JSUPPORT::JAutoTreeScanner< JBase_t, JEvaluator_t >::value_type

Definition at line 38 of file JAutoTreeScanner.hh.

◆ const_iterator

template<class JBase_t , class JEvaluator_t = JNullType>
typedef map_type::const_iterator JSUPPORT::JAutoTreeScanner< JBase_t, JEvaluator_t >::const_iterator

Definition at line 40 of file JAutoTreeScanner.hh.

◆ iterator

template<class JBase_t , class JEvaluator_t = JNullType>
typedef map_type::iterator JSUPPORT::JAutoTreeScanner< JBase_t, JEvaluator_t >::iterator

Definition at line 41 of file JAutoTreeScanner.hh.

◆ const_reverse_iterator

template<class JBase_t , class JEvaluator_t = JNullType>
typedef map_type::const_reverse_iterator JSUPPORT::JAutoTreeScanner< JBase_t, JEvaluator_t >::const_reverse_iterator

Definition at line 42 of file JAutoTreeScanner.hh.

◆ reverse_iterator

template<class JBase_t , class JEvaluator_t = JNullType>
typedef map_type::reverse_iterator JSUPPORT::JAutoTreeScanner< JBase_t, JEvaluator_t >::reverse_iterator

Definition at line 43 of file JAutoTreeScanner.hh.

Constructor & Destructor Documentation

◆ JAutoTreeScanner() [1/2]

template<class JBase_t , class JEvaluator_t = JNullType>
JSUPPORT::JAutoTreeScanner< JBase_t, JEvaluator_t >::JAutoTreeScanner ( )
inline

Default constructor.

Definition at line 51 of file JAutoTreeScanner.hh.

52  {}

◆ JAutoTreeScanner() [2/2]

template<class JBase_t , class JEvaluator_t = JNullType>
template<class T >
JSUPPORT::JAutoTreeScanner< JBase_t, JEvaluator_t >::JAutoTreeScanner ( JType< T >  type,
const bool  option = false 
)
inline

Constructor.

Parameters
typedata type
optioninclude namespace

Definition at line 62 of file JAutoTreeScanner.hh.

62  :
63  option(option)
64  {
65  this->template insert<T>();
66  }
bool option
include namespace

Member Function Documentation

◆ getOption()

template<class JBase_t , class JEvaluator_t = JNullType>
bool JSUPPORT::JAutoTreeScanner< JBase_t, JEvaluator_t >::getOption ( ) const
inline

Get option to include name space.

Returns
option

Definition at line 74 of file JAutoTreeScanner.hh.

75  {
76  return option;
77  }

◆ insert() [1/5]

template<class JBase_t , class JEvaluator_t = JNullType>
template<class T >
void JSUPPORT::JAutoTreeScanner< JBase_t, JEvaluator_t >::insert ( )
inline

Insert list of data types.

Definition at line 84 of file JAutoTreeScanner.hh.

85  {
86  using namespace JPP;
87 
88  if (option)
89  this->insert<T>(JAutomate< JElement_t<true> >());
90  else
91  this->insert<T>(JAutomate< JElement_t<false> >());
92  }
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary class for automatic element creation.
Definition: JAutoMap.hh:46

◆ getAutoElement()

template<class JKey_t , class JValue_t >
template<class T >
static value_type JTOOLS::JAutoMap< JKey_t, JValue_t >::getAutoElement ( JType< T >  type)
staticinherited

Creation of a map element for given data type.

This method should be overloaded for the requested data types if the method insert() is used without argument.

Parameters
typedata type
Returns
element

◆ insert() [2/5]

template<class JKey_t , class JValue_t >
template<class T , class JElement_t >
void JTOOLS::JAutoMap< JKey_t, JValue_t >::insert ( const JAutomate< JElement_t > &  automate)
inlineinherited

Insert list of data types.

Parameters
automatetype defined element

Definition at line 137 of file JAutoMap.hh.

138  {
139  insert(JType<T>(), automate);
140  }
void insert()
Insert list of data types.
Definition: JAutoMap.hh:125

◆ insert() [3/5]

template<class JKey_t , class JValue_t >
template<class T , class JElement_t >
void JTOOLS::JAutoMap< JKey_t, JValue_t >::insert ( JType< T >  type,
const JAutomate< JElement_t > &  automate 
)
inlineprotectedinherited

Insertion of single data type.

Parameters
typedata type
automateelement automate by data type

Definition at line 150 of file JAutoMap.hh.

152  {
153  map_type::insert(automate.getElement(type));
154  }
static JElement_t getElement(JType< T > type)
Get element.
Definition: JAutoMap.hh:54

◆ insert() [4/5]

template<class JKey_t , class JValue_t >
template<class JHead_t , class JTail_t , class JElement_t >
void JTOOLS::JAutoMap< JKey_t, JValue_t >::insert ( JType< JTypeList< JHead_t, JTail_t > >  typelist,
const JAutomate< JElement_t > &  automate 
)
inlineprotectedinherited

Recursive insertion of data types.

Parameters
typelisttype list
automateelement automate by data type

Definition at line 164 of file JAutoMap.hh.

166  {
167  insert(JType<JHead_t>(), automate);
168  insert(JType<JTail_t>(), automate);
169  }

◆ insert() [5/5]

template<class JKey_t , class JValue_t >
template<class JElement_t >
void JTOOLS::JAutoMap< JKey_t, JValue_t >::insert ( JType< JNullType type,
const JAutomate< JElement_t > &  automate 
)
inlineprotectedinherited

Template specialisation to terminate insertion of data types.

Parameters
typenull type
automateelement automate by data type

Definition at line 179 of file JAutoMap.hh.

181  {}

Member Data Documentation

◆ option

template<class JBase_t , class JEvaluator_t = JNullType>
bool JSUPPORT::JAutoTreeScanner< JBase_t, JEvaluator_t >::option
private

include namespace

Definition at line 114 of file JAutoTreeScanner.hh.


The documentation for this struct was generated from the following file: