GRINS-0.8.0
|
Abstract factory. More...
#include <factory_abstract.h>
Public Member Functions | |
virtual | ~FactoryAbstract () |
virtual libMesh::UniquePtr< Base > | create ()=0 |
Subclasses implement the actual construction of the Base object in create(). More... | |
Static Public Member Functions | |
static libMesh::UniquePtr< Base > | build (const std::string &name) |
Use this method to build objects of type Base. More... | |
Protected Member Functions | |
FactoryAbstract (const std::string &name) | |
Constructor is protected. Use the build() method to construct Base objects. More... | |
template<> | |
std::map< std::string, FactoryAbstract< CatalycityBase > * > & | factory_map () |
template<> | |
std::map< std::string, FactoryAbstract< libMesh::DirichletBoundary > * > & | factory_map () |
template<> | |
std::map< std::string, FactoryAbstract< NeumannBCContainer > * > & | factory_map () |
template<> | |
std::map< std::string, FactoryAbstract< Physics > * > & | factory_map () |
template<> | |
std::map< std::string, FactoryAbstract< Solver > * > & | factory_map () |
template<> | |
std::map< std::string, FactoryAbstract< libMesh::ErrorEstimator > * > & | factory_map () |
template<> | |
std::map< std::string, FactoryAbstract< FEVariablesBase > * > & | factory_map () |
Static Protected Member Functions | |
static FactoryAbstract< Base > & | get_factory (const std::string &name) |
Helper method that looks up the factory and returns it if present, or error if it's not. More... | |
template<typename DerivedType > | |
static DerivedType & | get_factory_subclass (const std::string &name) |
Like get_factory, but will downcast to DerivedType. More... | |
static std::map< std::string, FactoryAbstract< Base > * > & | factory_map () |
Abstract factory.
Copied from libMesh::Factory. The main difference is the helper method to fetch the factory (this was moved out of the build() function in libMesh::Factory). That is useful so subclasses can additional static methods that dispatch to virtual methods of the subclass.
Definition at line 45 of file factory_abstract.h.
|
inlinevirtual |
Definition at line 49 of file factory_abstract.h.
|
inlineprotected |
Constructor is protected. Use the build() method to construct Base objects.
Definition at line 75 of file factory_abstract.h.
|
inlinestatic |
Use this method to build objects of type Base.
Definition at line 86 of file factory_abstract.h.
References GRINS::FactoryAbstract< Base >::create().
|
pure virtual |
Subclasses implement the actual construction of the Base object in create().
Implemented in GRINS::DirichletBCFactoryFunctionBase< FunctionType >, GRINS::DirichletBCFactoryFunctionBase< libMesh::FEMFunctionBase< libMesh::Number > >, GRINS::DirichletBCFactoryFunctionBase< libMesh::FunctionBase< libMesh::Number > >, GRINS::ErrorEstimatorFactoryBase, GRINS::NeumannBCFactoryAbstract, GRINS::CatalycityFactoryAbstract, GRINS::PhysicsFactoryBase, GRINS::SolverFactoryAbstract, and GRINS::VariableFactoryAbstract.
Referenced by GRINS::FactoryAbstract< Base >::build().
|
protected |
Definition at line 33 of file physics_factory_base.C.
|
protected |
Definition at line 33 of file error_estimator_factory_base.C.
|
protected |
Definition at line 33 of file dirichlet_bc_factory_abstract.C.
|
protected |
Definition at line 34 of file catalycity_factory_abstract.C.
|
protected |
Definition at line 41 of file solver_factory_abstract.C.
|
staticprotected |
Referenced by GRINS::BCFactoryAbstract< Base >::have_bc_type().
|
protected |
Definition at line 77 of file neumann_bc_factory_abstract.C.
|
protected |
Definition at line 125 of file variable_factory.C.
|
inlinestaticprotected |
Helper method that looks up the factory and returns it if present, or error if it's not.
Definition at line 94 of file factory_abstract.h.
|
inlinestaticprotected |
Like get_factory, but will downcast to DerivedType.
Definition at line 117 of file factory_abstract.h.