DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
NaiveFactory.hpp
Go to the documentation of this file.
1
9#ifndef TPGLIBS_NAIVEFACTORY_HPP_
10#define TPGLIBS_NAIVEFACTORY_HPP_
11
14
16#define REGISTER_NAIVEPROCESSOR_CREATOR(processor_name, processor_class) \
17 static struct processor_class##Registrar { \
18 processor_class##Registrar() { \
19 tpglibs::NaiveFactory::register_creator(processor_name, []() -> std::shared_ptr<tpglibs::NaiveProcessor> {return std::make_shared<processor_class>();}); \
20 } \
21 } processor_class##_registrar;
22
23namespace tpglibs {
24
26class NaiveFactory : public AbstractFactory<NaiveProcessor> {};
27
28} // namespace tpglibs
29
30#endif // TPGLIBS_NAIVEFACTORY_HPP_
General singleton, abstract factory.
Naive typed abstract factory.