Generic AppFactory class for building Application objects. More...
#include <AppFactory.h>
Public Member Functions | |
virtual | ~AppFactory () |
template<typename T > | |
void | reg (const std::string &name) |
Register a new object. More... | |
InputParameters | getValidParams (const std::string &name) |
Get valid parameters for the object. More... | |
MooseAppPtr | createShared (const std::string &app_type, const std::string &name, InputParameters parameters, MPI_Comm COMM_WORLD_IN) |
Build an application object (must be registered) More... | |
const auto & | registeredObjects () const |
Returns a reference to the map from names to AppFactoryBuildInfo pointers. More... | |
bool | isRegistered (const std::string &app_name) const |
Returns a Boolean indicating whether an application type has been registered. More... | |
std::size_t | createdAppCount (const std::string &app_type) const |
const AppFactoryBuildInfoMap & | registeredObjectBuildInfos () const |
Returns the map of object name to a function pointer for building said object's input parameters. More... | |
AppFactory (AppFactory const &)=delete | |
Don't allow creation through copy/move construction or assignment. More... | |
Registry & | operator= (AppFactory const &)=delete |
AppFactory (AppFactory &&)=delete | |
Registry & | operator= (AppFactory &&)=delete |
Static Public Member Functions | |
static AppFactory & | instance () |
Get the instance of the AppFactory. More... | |
static InputParameters | validParams () |
static MooseAppPtr | createAppShared (const std::string &default_app_type, int argc, char **argv, std::unique_ptr< Parser > parser, MPI_Comm comm_word=MPI_COMM_WORLD) |
Helper function for creating a MooseApp from command-line arguments and a Parser. More... | |
static MooseAppPtr | createAppShared (const std::string &default_app_type, int argc, char **argv, MPI_Comm comm_word=MPI_COMM_WORLD) |
Deprecated helper function for creating a MooseApp for Apps haven't adapted to the new Parser and Builder changes. More... | |
Protected Attributes | |
AppFactoryBuildInfoMap | _name_to_build_info |
Private Member Functions | |
AppFactory () | |
Generic AppFactory class for building Application objects.
Definition at line 55 of file AppFactory.h.
|
virtual |
Definition at line 27 of file AppFactory.C.
|
delete |
Don't allow creation through copy/move construction or assignment.
|
delete |
|
inlineprivate |
|
static |
Helper function for creating a MooseApp from command-line arguments and a Parser.
Definition at line 39 of file AppFactory.C.
Referenced by Moose::createMooseApp().
|
static |
Deprecated helper function for creating a MooseApp for Apps haven't adapted to the new Parser and Builder changes.
This function needed to be removed after the new Parser and Builder merged
Definition at line 73 of file AppFactory.C.
std::size_t AppFactory::createdAppCount | ( | const std::string & | app_type | ) | const |
Definition at line 160 of file AppFactory.C.
MooseAppPtr AppFactory::createShared | ( | const std::string & | app_type, |
const std::string & | name, | ||
InputParameters | parameters, | ||
MPI_Comm | COMM_WORLD_IN | ||
) |
Build an application object (must be registered)
app_type | Type of the application being constructed |
name | Name for the object |
parameters | Parameters this object should have |
Definition at line 124 of file AppFactory.C.
Referenced by MultiApp::createApp(), createAppShared(), and MooseServer::parseDocumentForDiagnostics().
InputParameters AppFactory::getValidParams | ( | const std::string & | name | ) |
Get valid parameters for the object.
name | Name of the object whose parameter we are requesting |
Definition at line 30 of file AppFactory.C.
Referenced by MultiApp::createApp(), createAppShared(), and MooseServer::parseDocumentForDiagnostics().
|
static |
Get the instance of the AppFactory.
Definition at line 17 of file AppFactory.C.
Referenced by JsonSyntaxTree::addGlobal(), MultiApp::createApp(), MultiApp::createApps(), createAppShared(), Moose::createMooseApp(), MooseApp::dynamicAppRegistration(), MooseServer::parseDocumentForDiagnostics(), and MultiApp::validParams().
|
inline |
Returns a Boolean indicating whether an application type has been registered.
Definition at line 119 of file AppFactory.h.
Referenced by MultiApp::createApp(), Moose::createMooseApp(), and reg().
|
delete |
|
delete |
void AppFactory::reg | ( | const std::string & | name | ) |
Register a new object.
name | Name of the object to register |
Definition at line 153 of file AppFactory.h.
|
inline |
Returns the map of object name to a function pointer for building said object's input parameters.
Definition at line 133 of file AppFactory.h.
|
inline |
Returns a reference to the map from names to AppFactoryBuildInfo pointers.
Definition at line 114 of file AppFactory.h.
Referenced by MultiApp::validParams().
|
static |
|
protected |
Definition at line 144 of file AppFactory.h.
Referenced by createdAppCount(), createShared(), getValidParams(), isRegistered(), reg(), registeredObjectBuildInfos(), and registeredObjects().