![]() |
LArSoft
v10_06_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Class to create and set up a new provider. More...
#include "ProviderTestHelpers.h"
Static Public Member Functions | |
| template<typename... Args> | |
| static std::unique_ptr< Prov > | setup (Args &&...args) |
| Instantiates a new provider with specified arguments for constructor. More... | |
Class to create and set up a new provider.
| Prov | type of provider being set up |
The class ProviderSetupClass<Prov> is used by ProviderList to create and set up a new service provider. The class must have a static method setup(), compatible with setupProvider_t signature: it must return a fully set up provider contained in a std::unique_ptr<Prov>.
An example of implementation is DefaultSetupProviderClass, that is in fact the default implementation.
An example to implement a specific setup for a provider, MyProvider:
template <>
struct ProviderSetupClass<MyProvider> {
static std::unique_ptr<MyProvider> setup
(MyProvider::Config const& cfg)
{ return std::make_unique<MyProvider>(fhicl::Table<Config>(cfg)); }
}; // ProviderSetupClass<MyProvider>
calling a MyProvider(fhicl::Table<Config> const&) constructor.
Definition at line 76 of file ProviderTestHelpers.h.
|
inlinestaticinherited |
Instantiates a new provider with specified arguments for constructor.
Definition at line 42 of file ProviderTestHelpers.h.
Referenced by testing::setupProvider().