A CreatorMap is used to construct objects, which types depends on key words determined at run time. For example the LinearSolverInterfaceMap can create the different solver types depending on the solver parameter of the init file. The benefit of such creator maps is, that you can extend them only by writing an creator class for your own new class and give the creator together with a key word to the map.
More...
#include <CreatorMap.hpp>
|
static void | addCreator (std::string key, CreatorInterface< BaseClass > *creator) |
| Adds a new creator together with the given key to the map.
|
|
static CreatorInterface< BaseClass > * | get (std::string key, std::string initFileStr) |
| Creates a object of the type corresponding to key.
|
|
|
static CreatorMapType | creatorMap |
| STL map containing the pairs of keys and creators.
|
|
static bool | initialized = false |
|
template<class BaseClass>
class AMDiS::CreatorMap< BaseClass >
A CreatorMap is used to construct objects, which types depends on key words determined at run time. For example the LinearSolverInterfaceMap can create the different solver types depending on the solver parameter of the init file. The benefit of such creator maps is, that you can extend them only by writing an creator class for your own new class and give the creator together with a key word to the map.
The documentation for this class was generated from the following file: