The Gaudi Framework
master (594c33fa)
|
Helper to declare the factory implementation for a user defined type T
.
More...
#include </builds/gaudi/Gaudi/GaudiPluginService/include/Gaudi/PluginServiceV2.h>
Public Types | |
using | DefaultFactory = Details::DefaultFactory< T, F > |
Public Member Functions | |
DeclareFactory (typename F::FactoryType f=DefaultFactory{}, Details::Registry::Properties props={}, source_location src_loc=source_location::current()) | |
DeclareFactory (const std::string &id, typename F::FactoryType f=DefaultFactory{}, Details::Registry::Properties props={}, [[maybe_unused]] source_location src_loc=source_location::current()) | |
DeclareFactory (Details::Registry::Properties props, source_location src_loc=source_location::current()) | |
Static Private Member Functions | |
static std::string | libraryName () |
Helper to record the name of the library that declare the factory. More... | |
Helper to declare the factory implementation for a user defined type T
.
The basic use is:
which is the equivalent of DECLARE_COMPONENT( MyComponent )
.
It's possible to specify a custom factory type (instead of the default type alias MyComponent::Factory
):
We can pass arguments to the constructor to use a custom factory function, or a special id, or properties:
Definition at line 136 of file PluginServiceV2.h.
using Gaudi::PluginService::v2::DeclareFactory< T, F >::DefaultFactory = Details::DefaultFactory<T, F> |
Definition at line 137 of file PluginServiceV2.h.
|
inline |
Definition at line 139 of file PluginServiceV2.h.
|
inline |
|
inline |
Definition at line 159 of file PluginServiceV2.h.
|
inlinestaticprivate |
Helper to record the name of the library that declare the factory.
Definition at line 164 of file PluginServiceV2.h.