DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Types | Public Member Functions | Private Member Functions | Friends | List of all members
dd4hep::Grammar< TYPE > Class Template Reference

Concrete type dependent grammar definition. More...

#include <Grammar.h>

Inheritance diagram for dd4hep::Grammar< TYPE >:
dd4hep::BasicGrammar

Public Types

typedef TYPE type_t
 
- Public Types inherited from dd4hep::BasicGrammar
typedef unsigned long long int key_type
 

Public Member Functions

virtual const std::type_info & type () const override
 PropertyGrammar overload: Access to the type information. More...
 
virtual bool equals (const std::type_info &other_type) const override
 Access to the type information. More...
 
virtual size_t sizeOf () const override
 Access the object size (sizeof operator) More...
 
virtual void destruct (void *pointer) const override
 Opaque object destructor. More...
 
template<typename... Args>
void construct (void *pointer, Args... args) const
 Bind opaque address to object. More...
 
- Public Member Functions inherited from dd4hep::BasicGrammar
key_type hash () const
 Access the hash value for this grammar type. More...
 
const std::string & type_name () const
 Access to the type information name. More...
 
int data_type () const
 Access ROOT data type for fundamentals. More...
 
TClass * clazz () const
 Access the ROOT class for complex objects. More...
 
virtual void setCast (const Cast *cast) const
 Set cast structure. More...
 
virtual const Cast & cast () const
 Access ABI object cast. More...
 
virtual std::string str (const void *ptr) const
 Serialize an opaque value to a string. More...
 
virtual bool fromString (void *ptr, const std::string &value) const
 Set value from serialized string. On successful data conversion TRUE is returned. More...
 
virtual int evaluate (void *ptr, const std::string &value) const
 Evaluate string value if possible before calling boost::spirit. More...
 

Private Member Functions

virtual ~Grammar ()
 Default destructor. More...
 
 Grammar ()
 Standard constructor. More...
 

Friends

class BasicGrammar
 

Additional Inherited Members

- Static Public Member Functions inherited from dd4hep::BasicGrammar
template<typename TYPE >
static const BasicGrammarinstance ()
 Instance factory. More...
 
static const BasicGrammarget (const std::type_info &info)
 Access grammar by type info. More...
 
static const BasicGrammarget (unsigned long long int hash_code)
 Lookup existing grammar using the grammar's hash code/hash64(type-name) (used for reading objects) More...
 
static void invalidConversion (const std::type_info &from, const std::type_info &to)
 Error callback on invalid conversion. More...
 
static void invalidConversion (const std::string &value, const std::type_info &to)
 Error callback on invalid conversion. More...
 
- Public Attributes inherited from dd4hep::BasicGrammar
const std::string name
 Instance type name. More...
 
const key_type hash_value = 0
 Instance hash code. More...
 
TClass * root_class = 0
 Cached TClass reference for speed improvements. More...
 
int root_data_type = -1
 Cached TDataType information for fundamental types. More...
 
bool inited = false
 Initialization flag. More...
 
struct dd4hep::BasicGrammar::specialization_t specialization
 
- Protected Member Functions inherited from dd4hep::BasicGrammar
 BasicGrammar (const std::string &typ)
 Default constructor. More...
 
virtual ~BasicGrammar ()
 Default destructor. More...
 
void initialize () const
 Second step initialization after the virtual table is fixed. More...
 
int initialized_data_type () const
 Access ROOT data type for fundamentals. More...
 
TClass * initialized_clazz () const
 Access the ROOT class for complex objects. More...
 
- Static Protected Member Functions inherited from dd4hep::BasicGrammar
static void pre_note (const std::type_info &info, const BasicGrammar &(*fcn)(), specialization_t specs)
 Instance factory. More...
 

Detailed Description

template<typename TYPE>
class dd4hep::Grammar< TYPE >

Concrete type dependent grammar definition.

Author
M.Frank
Date
13.08.2013

Definition at line 167 of file Grammar.h.

Member Typedef Documentation

◆ type_t

template<typename TYPE >
typedef TYPE dd4hep::Grammar< TYPE >::type_t

Definition at line 177 of file Grammar.h.

Constructor & Destructor Documentation

◆ ~Grammar()

template<typename TYPE >
dd4hep::Grammar< TYPE >::~Grammar
privatevirtual

Default destructor.

Definition at line 199 of file Grammar.h.

◆ Grammar()

template<typename TYPE >
dd4hep::Grammar< TYPE >::Grammar
private

Standard constructor.

Standarsd constructor.

Definition at line 193 of file Grammar.h.

Member Function Documentation

◆ construct()

template<typename TYPE >
template<typename... Args>
void dd4hep::Grammar< TYPE >::construct ( void *  pointer,
Args...  args 
) const

Bind opaque address to object.

Definition at line 225 of file Grammar.h.

◆ destruct()

template<typename TYPE >
void dd4hep::Grammar< TYPE >::destruct ( void *  pointer) const
overridevirtual

Opaque object destructor.

Implements dd4hep::BasicGrammar.

Definition at line 218 of file Grammar.h.

◆ equals()

template<typename TYPE >
bool dd4hep::Grammar< TYPE >::equals ( const std::type_info &  other_type) const
overridevirtual

Access to the type information.

Implements dd4hep::BasicGrammar.

Definition at line 208 of file Grammar.h.

◆ sizeOf()

template<typename TYPE >
size_t dd4hep::Grammar< TYPE >::sizeOf
overridevirtual

Access the object size (sizeof operator)

Implements dd4hep::BasicGrammar.

Definition at line 213 of file Grammar.h.

◆ type()

template<typename TYPE >
const std::type_info & dd4hep::Grammar< TYPE >::type
overridevirtual

PropertyGrammar overload: Access to the type information.

Base class overrides

Implements dd4hep::BasicGrammar.

Definition at line 203 of file Grammar.h.

Friends And Related Function Documentation

◆ BasicGrammar

template<typename TYPE >
friend class BasicGrammar
friend

Definition at line 170 of file Grammar.h.


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