Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
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.
 

Static Public Member Functions

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

Detailed Description

Dictionary for parsing data from ROOT data frame to output.

Definition at line 132 of file JDataFrame.hh.

Member Typedef Documentation

◆ data_type

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

Definition at line 20 of file JSingleton.hh.

Constructor & Destructor Documentation

◆ JDictionary()

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

Definition at line 136 of file JDataFrame.hh.

137 {
138 add<bool>();
139 add<char>();
141 add<short>();
143 add<int>();
149 add<float>();
150 add<double>();
152 }
void add()
Add parser for given class to dictionary.

Member Function Documentation

◆ getTypename()

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.

◆ add()

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 }
static const char * getTypename()
Get typename for given template class.

◆ getInstance()

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: