ActionValue.hpp
Go to the documentation of this file.
1#ifndef ACTION_VALUE_HPP
2#define ACTION_VALUE_HPP
3
5
6namespace Opm {
8 number, // 0
9 ecl_expr, // 1
12 op_gt, // 4
13 op_ge, // 5
14 op_lt, // 6
15 op_le, // 7
16 op_eq, // 8
17 op_ne, // 9
18 op_and, // 10
19 op_or, // 11
20 end, // 12
21 error // 13
22};
23
24enum class FuncType {
25 none,
26 time,
27 region,
28 field,
29 group,
30 well,
34 aquifer,
35 block
36};
37
38namespace Action {
39
40class Value {
41public:
42 explicit Value(double value);
43 Value() = default;
44
45 Result eval_cmp(TokenType op, const Value& rhs) const;
46 void add_well(const std::string& well, double value);
47 double scalar() const;
48
49private:
50 Action::Result eval_cmp_wells(TokenType op, double rhs) const;
51
52 double scalar_value;
53 double is_scalar = false;
54 std::vector<std::pair<std::string, double>> well_values;
55};
56
57
58}
59}
60#endif
const char *const string
Definition: cJSON.h:170
Definition: ActionResult.hpp:89
Definition: ActionValue.hpp:40
double scalar() const
Value(double value)
void add_well(const std::string &well, double value)
Result eval_cmp(TokenType op, const Value &rhs) const
Action
Definition: InputErrorAction.hpp:36
Definition: A.hpp:4
TokenType
Definition: ActionValue.hpp:7
@ op_gt
Definition: ActionValue.hpp:12
@ op_le
Definition: ActionValue.hpp:15
@ open_paren
Definition: ActionValue.hpp:10
@ op_and
Definition: ActionValue.hpp:18
@ error
Definition: ActionValue.hpp:21
@ end
Definition: ActionValue.hpp:20
@ op_or
Definition: ActionValue.hpp:19
@ op_ne
Definition: ActionValue.hpp:17
@ close_paren
Definition: ActionValue.hpp:11
@ number
Definition: ActionValue.hpp:8
@ op_eq
Definition: ActionValue.hpp:16
@ ecl_expr
Definition: ActionValue.hpp:9
@ op_lt
Definition: ActionValue.hpp:14
@ op_ge
Definition: ActionValue.hpp:13
FuncType
Definition: ActionValue.hpp:24
T value(details::expression_node< T > *n)
Definition: exprtk.hpp:12955