Belle II Software development
|
Very simple class to provide an easy way to register creators with the CreatorManager. More...
#include <CreatorFactory.h>
Public Member Functions | |
CreatorFactory (const std::string &name) | |
Constructor to register the Creator with the CreatorManager. | |
Static Public Member Functions | |
static CreatorBase * | factory () |
Static factory function to return a new instance of the given Creator class. | |
Very simple class to provide an easy way to register creators with the CreatorManager.
When defining a new creator, add a
CreatorFactory<Classname> Classname_factory("CreatorName");
or similiar to the source file to automatically provide the needed factory function and register the creator with the CreatorManager
Definition at line 31 of file CreatorFactory.h.
|
inlineexplicit |
Constructor to register the Creator with the CreatorManager.
Definition at line 33 of file CreatorFactory.h.
|
inlinestatic |
Static factory function to return a new instance of the given Creator class.
Ownership of the object goes to the caller who is responsible of freeing the creator once it is done
Definition at line 42 of file CreatorFactory.h.