25#include <meteoio/thirdParty/tinyexpr.h>
219 FilterMaths(
const std::vector< std::pair<std::string, std::string> >& vecArgs,
220 const std::string& name,
const Config& cfg);
221 virtual void process(
const unsigned int& param,
const std::vector<MeteoData>& ivec,
222 std::vector<MeteoData>& ovec);
225 bool assertCondition(
const double& condition_value,
const double& condition_compare,
226 const std::string& condition_operator)
const;
227 bool assertStringCondition(
const std::string& line1,
const std::string& line2,
const std::string& op);
228 std::map<std::string, double> parseBracketExpression(std::string& line);
229 void buildSubstitutions();
230 void doSubstitutions(
const std::vector<MeteoData>& ivec,
const size_t& idx);
231 std::string doStringSubstitutions(
const std::string& line_in,
const MeteoData& ielem)
const;
232 te_expr* compileExpression(
const std::string& expression,
const te_variable* te_vars,
const size_t& sz)
const;
233 void initExpressionVars(te_variable* vars);
234 void parse_args(
const std::vector< std::pair<std::string, std::string> >& vecArgs);
235 bool isNan(
const double& xx)
const;
236 void checkOperator(
const std::string& op);
239 std::string expression;
242 logic_eq() : expression(
""), op(
""), compare(
"") {}
244 std::map<size_t, logic_eq> logic_equations;
245 std::map<std::string, double> substitutions;
248 std::string formula_else;
249 std::string connective;
250 std::string assign_param;
A class that reads a key/value file. These files (typically named *.ini) follow the INI file format s...
Definition: Config.h:79
A filter that evaluates formulas dependent on conditions.
Definition: FilterMaths.h:217
virtual void process(const unsigned int ¶m, const std::vector< MeteoData > &ivec, std::vector< MeteoData > &ovec)
The filtering routine as called by the processing toolchain.
Definition: FilterMaths.cc:43
FilterMaths(const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &name, const Config &cfg)
Definition: FilterMaths.cc:28
A class to represent a singular measurement received from one station at a certain time (represented ...
Definition: MeteoData.h:108
The base class for all filters that provides the interface and a few helper methods.
Definition: ProcessingBlock.h:67