Handles name-based creation of objects. More...
#include <factory.h>
Public Member Functions | |
virtual | ~Factory () |
virtual std::unique_ptr< Base > | create ()=0 |
Static Public Member Functions | |
static std::unique_ptr< Base > | build (const std::string &name) |
Protected Member Functions | |
Factory (const std::string &name) | |
template<> | |
std::map< std::string, Factory< Partitioner > *> & | factory_map () |
Static Protected Member Functions | |
static std::map< std::string, Factory< Base > * > & | factory_map () |
Handles name-based creation of objects.
Factory class definition.
|
inlineprotected |
Constructor. Takes the name to be mapped.
Definition at line 116 of file factory.h.
References libMesh::Quality::name().
|
inlinevirtual |
|
inlinestatic |
Builds an object of type Base identified by name.
Definition at line 129 of file factory.h.
References libMesh::Factory< Base >::create(), libMesh::err, and libMesh::Quality::name().
|
pure virtual |
Create a Base class. Force this to be implemented later.
Implemented in libMesh::FactoryImp< Derived, Base >.
Referenced by libMesh::Factory< Base >::build().
|
protected |
Definition at line 38 of file partitioner_factory.C.
|
staticprotected |
Map from a name to a Factory<Base> * pointer.