DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
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 BasicGrammar & | 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... | |
const Property & | str (const std::string &input) const |
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 Attributes | |
void * | m_par { nullptr } |
Pointer to the data location. More... | |
const BasicGrammar * | m_hdl { nullptr } |
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>.
Note: This class cannot be saved to a ROOT file!
Definition at line 48 of file ComponentProperties.h.
|
default |
Default constructor.
|
default |
Copy constructor.
dd4hep::Property::Property | ( | TYPE & | val | ) |
User constructor.
Definition at line 95 of file ComponentProperties.h.
const BasicGrammar & Property::grammar | ( | ) | const |
Access grammar object.
Definition at line 41 of file ComponentProperties.cpp.
Property & Property::operator= | ( | const char * | val | ) |
Assignment operator / set new balue.
Definition at line 74 of file ComponentProperties.cpp.
Property & dd4hep::Property::operator= | ( | const TYPE & | val | ) |
Assignment operator / set new balue.
Assignment operator / set new balue
Definition at line 111 of file ComponentProperties.h.
|
inline |
Access void data pointer.
Definition at line 67 of file ComponentProperties.h.
void dd4hep::Property::set | ( | const TYPE & | value | ) |
Set value of this property.
Definition at line 102 of file ComponentProperties.h.
std::string Property::str | ( | ) | const |
Conversion to string value.
Definition at line 48 of file ComponentProperties.cpp.
Property & Property::str | ( | const std::string & | input | ) |
Conversion from string value.
Definition at line 65 of file ComponentProperties.cpp.
const Property & Property::str | ( | const std::string & | input | ) | const |
Conversion from string value.
Definition at line 56 of file ComponentProperties.cpp.
std::string Property::type | ( | ) | const |
Property type name.
Definition at line 37 of file ComponentProperties.cpp.
|
static |
Property type name.
Definition at line 27 of file ComponentProperties.cpp.
|
static |
Property type name.
Definition at line 32 of file ComponentProperties.cpp.
TYPE dd4hep::Property::value |
Retrieve value.
Definition at line 126 of file ComponentProperties.h.
void dd4hep::Property::value | ( | TYPE & | value | ) | const |
Retrieve value from stack (large values e.g. vectors etc.)
Definition at line 117 of file ComponentProperties.h.
|
protected |
Reference to the grammar of this property (extended type description)
Definition at line 53 of file ComponentProperties.h.
|
protected |
Pointer to the data location.
Definition at line 51 of file ComponentProperties.h.