www.mooseframework.org
Classes | Typedefs | Functions
AppFactory.h File Reference

Go to the source code of this file.

Classes

class  AppFactory
 Generic AppFactory class for building Application objects. More...
 

Typedefs

using MooseAppPtr = MooseApp *
 alias to wrap shared pointer type TODO: Convert to shared pointer by default in the future using MooseAppPtr = std::shared_ptr<MooseApp>; More...
 
using paramsPtr) = InputParameters(*)(
 alias for validParams function More...
 
using appBuildPtr = MooseAppPtr(*)(const InputParameters &parameters)
 alias for method to build objects More...
 
using registeredMooseAppIterator = std::map< std::string, paramsPtr >::iterator
 alias for registered Object iterator More...
 

Functions

template<class T >
MooseAppbuildApp (const InputParameters &parameters)
 Build an object of type T. More...
 
template<class T >
MooseAppbuildAppSharedPtr (const InputParameters &parameters)
 

Typedef Documentation

using appBuildPtr = MooseAppPtr (*)(const InputParameters & parameters)

alias for method to build objects

Definition at line 45 of file AppFactory.h.

using MooseAppPtr = MooseApp *

alias to wrap shared pointer type TODO: Convert to shared pointer by default in the future using MooseAppPtr = std::shared_ptr<MooseApp>;

Definition at line 35 of file AppFactory.h.

using paramsPtr = InputParameters (*)(

alias for validParams function

Definition at line 40 of file AppFactory.h.

using registeredMooseAppIterator = std::map<std::string, paramsPtr>::iterator

alias for registered Object iterator

Definition at line 50 of file AppFactory.h.

Function Documentation

template<class T >
MooseApp* buildApp ( const InputParameters parameters)

Build an object of type T.

Definition at line 57 of file AppFactory.h.

58 {
59  return new T(parameters);
60 }
template<class T >
MooseApp* buildAppSharedPtr ( const InputParameters parameters)

Definition at line 63 of file AppFactory.h.

64 {
65  return std::make_shared<T>(parameters);
66 }