OOPS
oops::ModelMaker< MODEL, T > Class Template Reference

A subclass of ModelFactory able to create instances of T (a concrete subclass of ModelBase<MODEL>). Passes Geometry<MODEL> to the constructor of T. More...

#include <ModelBase.h>

Inheritance diagram for oops::ModelMaker< MODEL, T >:
Collaboration diagram for oops::ModelMaker< MODEL, T >:

Public Types

typedef Geometry< MODEL > Geometry_
 

Public Member Functions

 ModelMaker (const std::string &name)
 
ModelBase< MODEL > * make (const Geometry_ &geom, const ModelParametersBase &parameters) override
 
std::unique_ptr< ModelParametersBasemakeParameters () const override
 
- Public Member Functions inherited from oops::ModelFactory< MODEL >
virtual ~ModelFactory ()=default
 

Private Types

typedef TParameters_IfAvailableElseFallbackType_t< T, GenericModelParametersParameters_
 

Additional Inherited Members

- Static Public Member Functions inherited from oops::ModelFactory< MODEL >
static ModelBase< MODEL > * create (const Geometry_ &, const ModelParametersBase &parameters)
 Create and return a new model. More...
 
static std::unique_ptr< ModelParametersBasecreateParameters (const std::string &name)
 Create and return an instance of the subclass of ModelParametersBase storing parameters of models of the specified type. More...
 
static std::vector< std::string > getMakerNames ()
 Return the names of all models that can be created by one of the registered makers. More...
 
- Protected Member Functions inherited from oops::ModelFactory< MODEL >
 ModelFactory (const std::string &name)
 Register a maker able to create models of type name. More...
 

Detailed Description

template<class MODEL, class T>
class oops::ModelMaker< MODEL, T >

A subclass of ModelFactory able to create instances of T (a concrete subclass of ModelBase<MODEL>). Passes Geometry<MODEL> to the constructor of T.

Definition at line 189 of file generic/ModelBase.h.

Member Typedef Documentation

◆ Geometry_

template<class MODEL , class T >
typedef Geometry<MODEL> oops::ModelMaker< MODEL, T >::Geometry_

Definition at line 196 of file generic/ModelBase.h.

◆ Parameters_

template<class MODEL , class T >
typedef TParameters_IfAvailableElseFallbackType_t<T, GenericModelParameters> oops::ModelMaker< MODEL, T >::Parameters_
private

Defined as T::Parameters_ if T defines a Parameters_ type; otherwise as GenericModelParameters.

Definition at line 193 of file generic/ModelBase.h.

Constructor & Destructor Documentation

◆ ModelMaker()

template<class MODEL , class T >
oops::ModelMaker< MODEL, T >::ModelMaker ( const std::string &  name)
inlineexplicit

Definition at line 198 of file generic/ModelBase.h.

Member Function Documentation

◆ make()

template<class MODEL , class T >
ModelBase<MODEL>* oops::ModelMaker< MODEL, T >::make ( const Geometry_ geom,
const ModelParametersBase parameters 
)
inlineoverridevirtual

Implements oops::ModelFactory< MODEL >.

Definition at line 200 of file generic/ModelBase.h.

◆ makeParameters()

template<class MODEL , class T >
std::unique_ptr<ModelParametersBase> oops::ModelMaker< MODEL, T >::makeParameters ( ) const
inlineoverridevirtual

Implements oops::ModelFactory< MODEL >.

Definition at line 208 of file generic/ModelBase.h.


The documentation for this class was generated from the following file: