![]() |
![]() |
DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep
Rev:Unversioneddirectory
|
The property class to assign options to actions. More...
#include <ComponentProperties.h>
Public Member Functions | |
Property ()=default | |
Default constructor. More... | |
Property (const Property &p)=default | |
Copy constructor. More... | |
template<typename TYPE > | |
Property (TYPE &val) | |
User constructor. More... | |
void * | ptr () const |
Access void data pointer. More... | |
std::string | type () const |
Property type name. More... | |
const PropertyGrammar & | grammar () const |
Access grammar object. More... | |
std::string | str () const |
Conversion to string value. More... | |
Property & | str (const std::string &input) |
Conversion from string value. More... | |
Property & | operator= (const Property &p)=default |
Assignment operator. More... | |
Property & | operator= (const char *val) |
Assignment operator / set new balue. More... | |
template<typename TYPE > | |
Property & | operator= (const TYPE &val) |
Assignment operator / set new balue. More... | |
template<typename TYPE > | |
TYPE | value () const |
Retrieve value. More... | |
template<typename TYPE > | |
void | value (TYPE &value) const |
Retrieve value from stack (large values e.g. vectors etc.) More... | |
template<typename TYPE > | |
void | set (const TYPE &value) |
Set value of this property. More... | |
Static Public Member Functions | |
static std::string | type (const Property &proptery) |
Property type name. More... | |
static std::string | type (const std::type_info &proptery) |
Property type name. More... | |
Protected Member Functions | |
template<typename TYPE > | |
void | make (TYPE &value) |
Setup property. More... | |
Protected Attributes | |
void * | m_par = 0 |
Pointer to the data location. More... | |
const PropertyGrammar * | m_hdl = 0 |
Reference to the grammar of this property (extended type description) More... | |
The property class to assign options to actions.
Standard implementation of a property mechanism. The data conversion mechanism between various properties uses internally boost::spirit to allow also conversions between types, which are initially unrelated such as e.g. vector<int> and list<short>.
Definition at line 86 of file ComponentProperties.h.
|
default |
Default constructor.
|
default |
Copy constructor.
|
inline |
const PropertyGrammar & Property::grammar | ( | ) | const |
Access grammar object.
Definition at line 76 of file ComponentProperties.cpp.
References m_hdl.
Referenced by DD4hep::PropertyValue< TYPE >::grammar(), set(), DD4hep::PropertyManager::set(), type(), and value().
|
protected |
Setup property.
Definition at line 32 of file ComponentProperties_inl.h.
References dd4hep::g, m_hdl, and m_par.
Referenced by Property().
Property & Property::operator= | ( | const char * | val | ) |
Assignment operator / set new balue.
Assignment operator / set new balue
Definition at line 106 of file ComponentProperties.cpp.
Property & DD4hep::Property::operator= | ( | const TYPE & | val | ) |
Assignment operator / set new balue.
Assignment operator / set new balue
Definition at line 48 of file ComponentProperties_inl.h.
References set().
|
inline |
Access void data pointer.
Definition at line 109 of file ComponentProperties.h.
References m_par.
Referenced by DD4hep::PropertyManager::set().
void DD4hep::Property::set | ( | const TYPE & | value | ) |
Set value of this property.
Definition at line 39 of file ComponentProperties_inl.h.
References DD4hep::PropertyGrammar::fromString(), dd4hep::g, grammar(), DD4hep::PropertyGrammar::invalidConversion(), m_par, and DD4hep::PropertyGrammar::type().
Referenced by DD4hep::Simulation::Geant4Exec::configure(), operator=(), and DD4hep::PropertyValue< TYPE >::set().
string Property::str | ( | ) | const |
Conversion to string value.
Definition at line 83 of file ComponentProperties.cpp.
References m_hdl, m_par, and DD4hep::PropertyGrammar::str().
Referenced by DD4hep::PropertyManager::dump(), DD4hep::Converter< T, ARG >::operator()(), DD4hep::Parsers::parse(), DD4hep::Simulation::Geant4UIMessenger::SetNewValue(), DD4hep::PropertyValue< TYPE >::str(), DD4hep::Utils::toStream(), and value().
Property & Property::str | ( | const std::string & | input | ) |
Conversion from string value.
Definition at line 91 of file ComponentProperties.cpp.
References DD4hep::PropertyGrammar::fromString(), m_hdl, and m_par.
|
static |
Property type name.
Definition at line 62 of file ComponentProperties.cpp.
References grammar(), DD4hep::PropertyGrammar::type(), and type().
|
static |
Property type name.
string Property::type | ( | ) | const |
Property type name.
Definition at line 72 of file ComponentProperties.cpp.
References grammar().
Referenced by type().
TYPE DD4hep::Property::value | ( | ) | const |
Retrieve value.
Definition at line 63 of file ComponentProperties_inl.h.
Referenced by DD4hep::Simulation::Geant4Exec::run(), DD4hep::Simulation::Geant4UIManager::start(), and DD4hep::PropertyValue< TYPE >::value().
void DD4hep::Property::value | ( | TYPE & | value | ) | const |
Retrieve value from stack (large values e.g. vectors etc.)
Definition at line 54 of file ComponentProperties_inl.h.
References dd4hep::g, grammar(), DD4hep::PropertyGrammar::invalidConversion(), m_par, str(), and DD4hep::PropertyGrammar::type().
|
protected |
Reference to the grammar of this property (extended type description)
Definition at line 91 of file ComponentProperties.h.
|
protected |