DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Implementation of an object supporting arbitrary user extensions. More...
#include <ObjectExtensions.h>
Public Member Functions | |
ObjectExtensions (const std::type_info &parent_type) | |
Default constructor. More... | |
ObjectExtensions (const ObjectExtensions ©)=delete | |
Copy constructor. More... | |
virtual | ~ObjectExtensions () |
Default destructor. More... | |
ObjectExtensions & | operator= (const ObjectExtensions ©)=delete |
Assignment operator. More... | |
void | initialize () |
Initialize non-persistent object containers (e.g. after loading from ROOT file) More... | |
void | move (ObjectExtensions ©) |
Move extensions to target object. More... | |
void | clear (bool destroy=true) |
Clear all extensions. More... | |
void | copyFrom (const std::map< unsigned long long int, ExtensionEntry * > &ext, void *arg) |
Copy object extensions from another object. Hosting type must be identical! More... | |
void * | addExtension (unsigned long long int key, ExtensionEntry *entry) |
Add an extension object to the detector element. More... | |
void * | removeExtension (unsigned long long int key, bool destroy) |
Remove an existing extension object from the instance. More... | |
void * | extension (unsigned long long int key, bool alert) const |
Access an existing extension object from the detector element. More... | |
void * | extension (unsigned long long int key) const |
Access an existing extension object from the detector element. More... | |
Public Attributes | |
std::map< unsigned long long int, ExtensionEntry * > | extensions |
The extensions object. More... | |
Implementation of an object supporting arbitrary user extensions.
Usage by inheritance of the client supporting the functionality
Definition at line 33 of file ObjectExtensions.h.
ObjectExtensions::ObjectExtensions | ( | const std::type_info & | parent_type | ) |
Default constructor.
Definition at line 30 of file ObjectExtensions.cpp.
|
delete |
Copy constructor.
|
virtual |
Default destructor.
Definition at line 35 of file ObjectExtensions.cpp.
void * ObjectExtensions::addExtension | ( | unsigned long long int | key, |
ExtensionEntry * | entry | ||
) |
Add an extension object to the detector element.
Definition at line 65 of file ObjectExtensions.cpp.
void ObjectExtensions::clear | ( | bool | destroy = true | ) |
Clear all extensions.
Internal object destructor: release extension object(s)
Definition at line 47 of file ObjectExtensions.cpp.
void ObjectExtensions::copyFrom | ( | const std::map< unsigned long long int, ExtensionEntry * > & | ext, |
void * | arg | ||
) |
Copy object extensions from another object. Hosting type must be identical!
Copy object extensions from another object.
Definition at line 58 of file ObjectExtensions.cpp.
void * ObjectExtensions::extension | ( | unsigned long long int | key | ) | const |
Access an existing extension object from the detector element.
Definition at line 98 of file ObjectExtensions.cpp.
void * ObjectExtensions::extension | ( | unsigned long long int | key, |
bool | alert | ||
) | const |
Access an existing extension object from the detector element.
Definition at line 108 of file ObjectExtensions.cpp.
void dd4hep::ObjectExtensions::initialize | ( | ) |
Initialize non-persistent object containers (e.g. after loading from ROOT file)
void ObjectExtensions::move | ( | ObjectExtensions & | copy | ) |
Move extensions to target object.
Definition at line 41 of file ObjectExtensions.cpp.
|
delete |
Assignment operator.
void * ObjectExtensions::removeExtension | ( | unsigned long long int | key, |
bool | destroy | ||
) |
Remove an existing extension object from the instance.
Definition at line 82 of file ObjectExtensions.cpp.
std::map<unsigned long long int, ExtensionEntry*> dd4hep::ObjectExtensions::extensions |
The extensions object.
Definition at line 36 of file ObjectExtensions.h.