OOPS
VariableChangeParametersBase.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2020 Met Office UK
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  */
7 
8 #ifndef OOPS_BASE_VARIABLECHANGEPARAMETERSBASE_H_
9 #define OOPS_BASE_VARIABLECHANGEPARAMETERSBASE_H_
10 
11 #include <string>
12 
14 #include "oops/base/Variables.h"
15 #include "oops/util/parameters/OptionalParameter.h"
16 #include "oops/util/parameters/Parameters.h"
17 
18 namespace oops {
19 
20 /// \brief Base class of classes storing parameters controlling specific variable changes.
21 class VariableChangeParametersBase : public Parameters {
22  OOPS_ABSTRACT_PARAMETERS(VariableChangeParametersBase, Parameters)
23  public:
24  /// \brief Variable change type.
25  ///
26  /// \note This parameter is marked as optional because it is only required in certain
27  /// circumstances (e.g. when variable change parameters are deserialized into a
28  /// VariableChangeParametersWrapper and used by VariableChangeFactory to instantiate a variable
29  /// change whose type is determined at runtime), but not others (e.g. in tests written with a
30  /// particular variable change in mind). VariableChangeParametersWrapper will throw an exception
31  /// if this parameter is not provided.
32  OptionalParameter<std::string> variableChange{"variable change", this};
33 
34  OptionalParameter<Variables> inputVariables{"input variables", this};
35  OptionalParameter<Variables> outputVariables{"output variables", this};
36 };
37 
38 } // namespace oops
39 
40 #endif // OOPS_BASE_VARIABLECHANGEPARAMETERSBASE_H_
oops
The namespace for the main oops code.
Definition: ErrorCovarianceL95.cc:22
oops::VariableChangeParametersBase::outputVariables
OptionalParameter< Variables > outputVariables
Definition: VariableChangeParametersBase.h:35
oops::VariableChangeParametersBase
Base class of classes storing parameters controlling specific variable changes.
Definition: VariableChangeParametersBase.h:21
oops::VariableChangeParametersBase::inputVariables
OptionalParameter< Variables > inputVariables
Definition: VariableChangeParametersBase.h:34
ParameterTraitsVariables.h
Variables.h
oops::VariableChangeParametersBase::variableChange
OptionalParameter< std::string > variableChange
Variable change type.
Definition: VariableChangeParametersBase.h:32