UFO
ufo::PredictorFactory Class Referenceabstract

Predictor Factory. More...

#include <PredictorBase.h>

Inheritance diagram for ufo::PredictorFactory:

Public Member Functions

virtual ~PredictorFactory ()=default
 

Static Public Member Functions

static std::unique_ptr< PredictorBasecreate (const PredictorParametersBase &parameters, const oops::Variables &vars)
 Create and return a new predictor. More...
 
static std::unique_ptr< PredictorParametersBasecreateParameters (const std::string &name)
 Create and return an instance of the subclass of PredictorParametersBase storing parameters of predictors of the specified type. More...
 
static std::vector< std::string > getMakerNames ()
 Return the names of all predictors that can be created by one of the registered makers. More...
 
static bool predictorExists (const std::string &name)
 Return true if a maker has been registered for a predictor of type name. More...
 

Protected Member Functions

 PredictorFactory (const std::string &name)
 Register a maker able to create predictors of type name. More...
 

Private Member Functions

virtual std::unique_ptr< PredictorBasemake (const PredictorParametersBase &, const oops::Variables &)=0
 
virtual std::unique_ptr< PredictorParametersBasemakeParameters () const =0
 

Static Private Member Functions

static std::map< std::string, PredictorFactory * > & getMakers ()
 

Detailed Description

Predictor Factory.

Definition at line 97 of file PredictorBase.h.

Constructor & Destructor Documentation

◆ ~PredictorFactory()

virtual ufo::PredictorFactory::~PredictorFactory ( )
virtualdefault

◆ PredictorFactory()

ufo::PredictorFactory::PredictorFactory ( const std::string &  name)
explicitprotected

Register a maker able to create predictors of type name.

Definition at line 29 of file PredictorBase.cc.

Here is the call graph for this function:

Member Function Documentation

◆ create()

std::unique_ptr< PredictorBase > ufo::PredictorFactory::create ( const PredictorParametersBase parameters,
const oops::Variables &  vars 
)
static

Create and return a new predictor.

The predictor type is determined by the name attribute of parameters. parameters must be an instance of the subclass of PredictorParametersBase associated with that predictor type, otherwise an exception will be thrown.

Definition at line 40 of file PredictorBase.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createParameters()

std::unique_ptr< PredictorParametersBase > ufo::PredictorFactory::createParameters ( const std::string &  name)
static

Create and return an instance of the subclass of PredictorParametersBase storing parameters of predictors of the specified type.

Definition at line 58 of file PredictorBase.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMakerNames()

static std::vector<std::string> ufo::PredictorFactory::getMakerNames ( )
inlinestatic

Return the names of all predictors that can be created by one of the registered makers.

Definition at line 112 of file PredictorBase.h.

Here is the call graph for this function:

◆ getMakers()

static std::map< std::string, PredictorFactory * >& ufo::PredictorFactory::getMakers ( )
inlinestaticprivate

Definition at line 131 of file PredictorBase.h.

Here is the caller graph for this function:

◆ make()

virtual std::unique_ptr<PredictorBase> ufo::PredictorFactory::make ( const PredictorParametersBase ,
const oops::Variables &   
)
privatepure virtual

Implemented in ufo::PredictorMaker< T >.

◆ makeParameters()

virtual std::unique_ptr<PredictorParametersBase> ufo::PredictorFactory::makeParameters ( ) const
privatepure virtual

Implemented in ufo::PredictorMaker< T >.

◆ predictorExists()

bool ufo::PredictorFactory::predictorExists ( const std::string &  name)
static

Return true if a maker has been registered for a predictor of type name.

Definition at line 70 of file PredictorBase.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

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