DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
NaiveFactory.hpp File Reference
Include dependency graph for NaiveFactory.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  tpglibs::NaiveFactory
 Naive typed abstract factory. More...
 

Namespaces

namespace  tpglibs
 

Macros

#define REGISTER_NAIVEPROCESSOR_CREATOR(processor_name, processor_class)
 Factory registration macro.
 

Detailed Description

Definition in file NaiveFactory.hpp.

Macro Definition Documentation

◆ REGISTER_NAIVEPROCESSOR_CREATOR

#define REGISTER_NAIVEPROCESSOR_CREATOR ( processor_name,
processor_class )
Value:
static struct processor_class##Registrar { \
processor_class##Registrar() { \
tpglibs::NaiveFactory::register_creator(processor_name, []() -> std::shared_ptr<tpglibs::NaiveProcessor> {return std::make_shared<processor_class>();}); \
} \
} processor_class##_registrar;

Factory registration macro.

Definition at line 16 of file NaiveFactory.hpp.

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;