DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Manager to ease the handling of groups of properties. More...
#include <ComponentProperties.h>
Public Types | |
typedef std::map< std::string, Property > | Properties |
Property array definition. More... | |
Public Member Functions | |
PropertyManager () | |
Default constructor. More... | |
virtual | ~PropertyManager () |
Default destructor. More... | |
size_t | size () const |
Access total number of properties. More... | |
bool | exists (const std::string &name) const |
Check for existence. More... | |
Properties & | properties () |
Access to the property container. More... | |
const Properties & | properties () const |
Access to the property container. More... | |
const Property & | property (const std::string &name) const |
Access property by name (CONST) More... | |
Property & | property (const std::string &name) |
Access property by name. More... | |
Property & | operator[] (const std::string &name) |
Access property by name. More... | |
const Property & | operator[] (const std::string &name) const |
Access property by name. More... | |
void | add (const std::string &name, const Property &property) |
Add a new property. More... | |
template<typename T > | |
void | add (const std::string &name, T &value) |
Add a new property. More... | |
template<typename FUNCTOR > | |
void | for_each (FUNCTOR &func) |
Apply functor on properties. More... | |
template<typename FUNCTOR > | |
void | for_each (const FUNCTOR &func) |
Apply functor on properties. More... | |
void | adopt (const PropertyManager ©) |
Import properties of another instance. More... | |
void | dump () const |
Dump string values. More... | |
Protected Member Functions | |
void | verifyNonExistence (const std::string &name) const |
Verify that this property does not exist (throw exception if the name was found) More... | |
Properties::iterator | verifyExistence (const std::string &name) |
Verify that this property exists (throw exception if the name was not found) More... | |
Properties::const_iterator | verifyExistence (const std::string &name) const |
Verify that this property exists (throw exception if the name was not found) More... | |
Protected Attributes | |
Properties | m_properties |
Property array/map. More... | |
Manager to ease the handling of groups of properties.
Note: This class cannot be saved to a ROOT file!
Definition at line 174 of file ComponentProperties.h.
typedef std::map<std::string, Property> dd4hep::PropertyManager::Properties |
Property array definition.
Definition at line 177 of file ComponentProperties.h.
PropertyManager::PropertyManager | ( | ) |
Default constructor.
Definition at line 83 of file ComponentProperties.cpp.
|
virtual |
Default destructor.
Definition at line 87 of file ComponentProperties.cpp.
void PropertyManager::add | ( | const std::string & | name, |
const Property & | property | ||
) |
Add a new property.
Definition at line 154 of file ComponentProperties.cpp.
|
inline |
Add a new property.
Definition at line 213 of file ComponentProperties.h.
void PropertyManager::adopt | ( | const PropertyManager & | copy | ) |
Import properties of another instance.
Definition at line 97 of file ComponentProperties.cpp.
void PropertyManager::dump | ( | ) | const |
Dump string values.
Definition at line 160 of file ComponentProperties.cpp.
bool PropertyManager::exists | ( | const std::string & | name | ) | const |
Check for existence.
Definition at line 102 of file ComponentProperties.cpp.
|
inline |
Apply functor on properties.
Definition at line 221 of file ComponentProperties.h.
|
inline |
Apply functor on properties.
Definition at line 217 of file ComponentProperties.h.
Property & PropertyManager::operator[] | ( | const std::string & | name | ) |
Access property by name.
Definition at line 144 of file ComponentProperties.cpp.
const Property & PropertyManager::operator[] | ( | const std::string & | name | ) | const |
Access property by name.
Definition at line 149 of file ComponentProperties.cpp.
|
inline |
Access to the property container.
Definition at line 199 of file ComponentProperties.h.
|
inline |
Access to the property container.
Definition at line 201 of file ComponentProperties.h.
Property & PropertyManager::property | ( | const std::string & | name | ) |
Access property by name.
Access property by name (CONST)
Definition at line 134 of file ComponentProperties.cpp.
const Property & PropertyManager::property | ( | const std::string & | name | ) | const |
Access property by name (CONST)
Access property by name.
Definition at line 139 of file ComponentProperties.cpp.
size_t PropertyManager::size | ( | ) | const |
Access total number of properties.
Definition at line 92 of file ComponentProperties.cpp.
|
protected |
Verify that this property exists (throw exception if the name was not found)
Definition at line 126 of file ComponentProperties.cpp.
|
protected |
Verify that this property exists (throw exception if the name was not found)
Definition at line 117 of file ComponentProperties.cpp.
|
protected |
Verify that this property does not exist (throw exception if the name was found)
Definition at line 108 of file ComponentProperties.cpp.
|
protected |
Property array/map.
Definition at line 180 of file ComponentProperties.h.