Alsvinn
0.5.3
The fast FVM simulator with UQ support
|
#include <alsutils/base/Factory.hpp>
Public Types | |
typedef impl::FactoryRegistry< T, Args... >::PointerType | PointerType |
typedef impl::FactoryRegistry< T, Args... >::CreatorType | CreatorType |
Static Public Member Functions | |
static PointerType | createInstance (const std::string &name, Args... args) |
Creates a new instance of the class with the given name and arguments. More... | |
static bool | registerClass (const std::string &name, CreatorType creator) |
template<class C > | |
static bool | registerClassWithOnlyConstructor (const std::string &name) |
This is the base class for all "automatic factories"
The way this class is meant to be used, is to subclass this class specializing the templates
Example
typedef impl::FactoryRegistry<T, Args...>::CreatorType alsutils::base::Factory< T, Args >::CreatorType |
typedef impl::FactoryRegistry<T, Args...>::PointerType alsutils::base::Factory< T, Args >::PointerType |
|
inlinestatic |
Creates a new instance of the class with the given name and arguments.
|
inlinestatic |
Registers a new class to the registry.
name | the name of the class |
creator | the creator/constructor |
|
inlinestatic |
Registers a new class to the registry, in this case, we assume the class has a constructor that takes all the default arguments
name | the name of the class |