14 #ifndef FLASHALGOFACTORY_H
15 #define FLASHALGOFACTORY_H
59 std::cerr <<
"Found no registered class " << name << std::endl;
62 auto ptr = (*iter).second->create(instance_name);
68 std::map<std::string,lightana::FlashAlgoFactoryBase*>
_factory_map;
BEGIN_PROLOG could also be cerr
void add_factory(const std::string name, lightana::FlashAlgoFactoryBase *factory)
Factory registration method (should be called by global factory instance in algorithm header) ...
FlashAlgoFactory()
Default ctor, shouldn't be used.
static FlashAlgoFactory * _me
Static self.
Factory class for instantiating flash algorithm instance.
std::map< std::string, lightana::FlashAlgoFactoryBase * > _factory_map
Static factory container.
FlashAlgoFactoryBase()
Default ctor.
virtual ~FlashAlgoFactoryBase()
Default dtor (virtual)
~FlashAlgoFactory()
Default dtor.
FlashAlgoBase * create(const std::string name, const std::string instance_name)
Factory creation method (should be called by clients, possibly you!)
virtual FlashAlgoBase * create(const std::string instance_name)=0
Abstract constructor method.