Jpp  19.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | List of all members
JROOT::JDataFrame::JDictionary Struct Reference

Dictionary for parsing data from ROOT data frame to output. More...

#include <JDataFrame.hh>

Inheritance diagram for JROOT::JDataFrame::JDictionary:
std::map< std::string, std::unique_ptr< JParser > > JLANG::JSingleton< T >

Public Types

typedef T data_type
 

Public Member Functions

 JDictionary ()
 
template<class T >
void add ()
 Add parser for given class to dictionary. More...
 

Static Public Member Functions

template<class T >
static const char * getTypename ()
 Get typename for given template class. More...
 
static data_typegetInstance ()
 Get unique instance of template class. More...
 

Detailed Description

Dictionary for parsing data from ROOT data frame to output.

Definition at line 132 of file JDataFrame.hh.

Member Typedef Documentation

template<class T>
typedef T JLANG::JSingleton< T >::data_type
inherited

Definition at line 20 of file JSingleton.hh.

Constructor & Destructor Documentation

JROOT::JDataFrame::JDictionary::JDictionary ( )
inline

Definition at line 136 of file JDataFrame.hh.

137  {
138  add<bool>();
139  add<char>();
140  add<unsigned char>();
141  add<short>();
142  add<unsigned short>();
143  add<int>();
144  add<unsigned int>();
145  add<long int>();
146  add<unsigned long int>();
147  add<long long int>();
148  add<unsigned long long int>();
149  add<float>();
150  add<double>();
151  add<std::string>();
152  }

Member Function Documentation

template<class T >
static const char* JROOT::JDataFrame::JDictionary::getTypename ( )
inlinestatic

Get typename for given template class.

This method uses the TDictionary class to get the name of the given class.

Returns
type name

Definition at line 163 of file JDataFrame.hh.

164  {
165  const TDictionary* pDictionary = TDictionary::GetDictionary(typeid(T));
166 
167  if (pDictionary != NULL)
168  return pDictionary->GetName();
169  else
170  THROW(JException, "Data type not implemented.");
171  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:712
do set_variable OUTPUT_DIRECTORY $WORKDIR T
template<class T >
void JROOT::JDataFrame::JDictionary::add ( )
inline

Add parser for given class to dictionary.

Definition at line 178 of file JDataFrame.hh.

179  {
180  (*this)[getTypename<T>()].reset(new JDataFrame::JParser_t<T>());
181  }
Template implementation for parsing data from ROOT data frame to output.
Definition: JDataFrame.hh:106
void reset(T &value)
Reset value.
template<class T>
static data_type& JLANG::JSingleton< T >::getInstance ( )
inlinestaticinherited

Get unique instance of template class.

Returns
object

Definition at line 27 of file JSingleton.hh.

28  {
29  static data_type value;
30 
31  return value;
32  }

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