9#ifndef TPGLIBS_NAIVEFACTORY_HPP_
10#define TPGLIBS_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>();}); \
21 } processor_class##_registrar;
General singleton, abstract factory.
Naive typed abstract factory.