factory.hpp
207 /* register a Derived class with its xml default constructor that will be instantiate as Base*/ \
208 __attribute__((unused)) static int factory_##Base##_##Derived = mimmo::Factory<Base>::instance().addCreator(name, new mimmo::Creator<Base, Derived>());
223 /* register a Derived class a custom xml constructor/creator method that will be instantiate as Base*/ \
std::vector< std::string > mapRegisteredBlocks()
Definition: factory.hpp:134
Factory base template singleton for automatic factorization of executable classes.
Definition: factory.hpp:47
virtual Base * create(const bitpit::Config::Section &xml_root) const =0
int addCreator(const std::string name, const AbstractCreator *creator)
Definition: factory.hpp:109
static Base * create(const std::string name, const bitpit::Config::Section &xml_root)
Definition: factory.hpp:87
virtual Derived * create(const bitpit::Config::Section &xml_root) const
Definition: factory.hpp:189
int setDefaultCreator(const AbstractCreator *creator)
Definition: factory.hpp:127
bool containsCreator(const std::string &name)
Definition: factory.hpp:119
Abstract class embedded in Factory to link creators of type Base* <>(const bitpit::Config::Section & ...
Definition: factory.hpp:67
virtual ~AbstractCreator()
Definition: factory.hpp:70
Template class to create an object Base * = new Derived creator class, where Derived is a generic der...
Definition: factory.hpp:168