8 #ifndef UFO_FILTERS_OBSFUNCTIONS_OBSFUNCTIONBASE_H_
9 #define UFO_FILTERS_OBSFUNCTIONS_OBSFUNCTIONBASE_H_
14 #include <boost/noncopyable.hpp>
16 #include "ioda/ObsDataVector.h"
29 template <
typename FunctionValue>
35 explicit ObsFunctionBase(
const eckit::LocalConfiguration conf = eckit::LocalConfiguration()) {}
49 template <
typename FunctionValue>
79 static const char *valueTypeName;
81 static const char *groupName;
87 template <
typename FunctionValue>
97 static std::map < std::string, ObsFunctionFactory * > &
getMakers() {
98 static std::map < std::string, ObsFunctionFactory * > makers_;
111 {
return new T(conf); }
ObsFilterData provides access to all data related to an ObsFilter.
virtual const ufo::Variables & requiredVariables() const =0
geovals required to compute the function
virtual ~ObsFunctionBase()
ObsFunctionBase(const eckit::LocalConfiguration conf=eckit::LocalConfiguration())
virtual void compute(const ObsFilterData &, ioda::ObsDataVector< FunctionValue > &) const =0
compute the result of the function
FunctionValue Value_
Type of the values produced by the function.
Factory of ObsFunctions producing values of type FunctionValue.
virtual ~ObsFunctionFactory()=default
virtual ObsFunctionBase< FunctionValue > * make(const eckit::LocalConfiguration conf)=0
static bool functionExists(const std::string &)
ObsFunctionFactory(const std::string &)
static std::map< std::string, ObsFunctionFactory * > & getMakers()
static ObsFunctionBase< FunctionValue > * create(const Variable &)
ObsFunctionFactory< Value_ > Factory_
virtual ObsFunctionBase< Value_ > * make(const eckit::LocalConfiguration conf)
ObsFunctionMaker(const std::string &name)
static const char * valueTypeName
Name of the type of values produced by subclasses of ObsFunctionBase<float>.
static const char * groupName
Name of the group identifying ObsFunctions producing floats.
static const char * valueTypeName
Name of the type of values produced by subclasses of ObsFunctionBase<int>.
static const char * groupName
Name of the group identifying ObsFunctions producing ints.
static const char * valueTypeName
Name of the type of values produced by subclasses of ObsFunctionBase<std::string>.
static const char * groupName
Name of the group identifying ObsFunctions producing strings.
Common properties of ObsFunctions producing values of type FunctionValue.