DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
In-memory database of the loaded factories. More...
#include <PluginServiceDetailsV1.h>
Classes | |
struct | FactoryInfo |
Public Types | |
typedef std::string | KeyType |
typedef std::map< KeyType, std::string > | Properties |
Type used for the properties implementation. More... | |
typedef std::map< KeyType, FactoryInfo > | FactoryMap |
Type used for the database implementation. More... | |
Public Member Functions | |
template<typename F , typename T , typename I > | |
FactoryInfo & | add (const I &id, typename F::FuncType ptr) |
Add a factory to the database. More... | |
void * | get (const std::string &id, const std::string &type) const |
Retrieve the factory for the given id. More... | |
const FactoryInfo & | getInfo (const std::string &id) const |
Retrieve the FactoryInfo object for an id. More... | |
Registry & | addProperty (const std::string &id, const std::string &k, const std::string &v) |
Add a property to an already existing FactoryInfo object (via its id.) More... | |
std::set< KeyType > | loadedFactoryNames () const |
Return a list of all the known and loaded factories. More... | |
const FactoryMap & | factories () const |
Return the known factories (loading the list if not yet done). More... | |
Static Public Member Functions | |
static Registry & | instance () |
Retrieve the singleton instance of Registry. More... | |
Private Member Functions | |
Registry () | |
Registry (const Registry &) | |
Private copy constructor for the singleton pattern. More... | |
FactoryInfo & | add (const std::string &id, void *factory, const std::string &type, const std::string &rtype, const std::string &className, const Properties &props=Properties()) |
Add a factory to the database. More... | |
FactoryMap & | factories () |
Return the known factories (loading the list if not yet done). More... | |
void | initialize () |
Private Attributes | |
bool | m_initialized |
Flag recording if the registry has been initialized or not. More... | |
FactoryMap | m_factories |
Internal storage for factories. More... | |
std::recursive_mutex | m_mutex |
Mutex used to control concurrent access to the internal data. More... | |
In-memory database of the loaded factories.
Definition at line 83 of file PluginServiceDetailsV1.h.
typedef std::map<KeyType, FactoryInfo> Gaudi::PluginService::v1::Details::Registry::FactoryMap |
Type used for the database implementation.
Definition at line 114 of file PluginServiceDetailsV1.h.
typedef std::string Gaudi::PluginService::v1::Details::Registry::KeyType |
Definition at line 85 of file PluginServiceDetailsV1.h.
typedef std::map<KeyType, std::string> Gaudi::PluginService::v1::Details::Registry::Properties |
Type used for the properties implementation.
Definition at line 88 of file PluginServiceDetailsV1.h.
|
private |
Private constructor for the singleton pattern. At construction time, the internal database of known factories is filled with the name of the libraries containing them, using the ".components" files in the LD_LIBRARY_PATH.
Definition at line 142 of file PluginServiceV1.cpp.
|
inlineprivate |
Private copy constructor for the singleton pattern.
Definition at line 159 of file PluginServiceDetailsV1.h.
|
inline |
Add a factory to the database.
Definition at line 121 of file PluginServiceDetailsV1.h.
|
private |
Add a factory to the database.
Definition at line 241 of file PluginServiceV1.cpp.
Registry & Gaudi::PluginService::v2::Details::Registry::addProperty | ( | const std::string & | id, |
const std::string & | k, | ||
const std::string & | v | ||
) |
Add a property to an already existing FactoryInfo object (via its id.)
Definition at line 303 of file PluginServiceV1.cpp.
|
inlineprivate |
Return the known factories (loading the list if not yet done).
Definition at line 166 of file PluginServiceDetailsV1.h.
|
inline |
Return the known factories (loading the list if not yet done).
Definition at line 146 of file PluginServiceDetailsV1.h.
void * Gaudi::PluginService::v1::Details::Registry::get | ( | const std::string & | id, |
const std::string & | type | ||
) | const |
Retrieve the factory for the given id.
Definition at line 266 of file PluginServiceV1.cpp.
const Registry::FactoryInfo & Gaudi::PluginService::v2::Details::Registry::getInfo | ( | const std::string & | id | ) | const |
Retrieve the FactoryInfo object for an id.
Definition at line 295 of file PluginServiceV1.cpp.
|
private |
Initialize the registry loading the list of factories from the .component files in the library search path.
Definition at line 144 of file PluginServiceV1.cpp.
|
static |
Retrieve the singleton instance of Registry.
Definition at line 136 of file PluginServiceV1.cpp.
std::set< Registry::KeyType > Gaudi::PluginService::v2::Details::Registry::loadedFactoryNames | ( | ) | const |
Return a list of all the known and loaded factories.
Definition at line 311 of file PluginServiceV1.cpp.
|
private |
Internal storage for factories.
Definition at line 179 of file PluginServiceDetailsV1.h.
|
private |
Flag recording if the registry has been initialized or not.
Definition at line 176 of file PluginServiceDetailsV1.h.
|
mutableprivate |
Mutex used to control concurrent access to the internal data.
Definition at line 182 of file PluginServiceDetailsV1.h.