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