|
My Project
|
Numeric value of an AST sub-expression. More...
#include <ActionValue.hpp>
Public Member Functions | |
| Value ()=default | |
| Default constructor. | |
| Value (double value) | |
| Constructor. | |
| Value (std::string_view wname, double value) | |
| Constructor. | |
| Result | eval_cmp (TokenType op, const Value &rhs) const |
| Compare current Value to another Value. | |
| void | add_well (std::string_view well, double value) |
| Incorporate well level function value into Value object. | |
| double | scalar () const |
| Retrieve scalar function value. | |
Numeric value of an AST sub-expression.
|
default |
Default constructor.
Resulting object is meaningful only if calling code later invokes the add_well() member function.
|
explicit |
| Opm::Action::Value::Value | ( | std::string_view | wname, |
| double | value | ||
| ) |
Constructor.
Creates a non-scalar Value object associated to a single well.
| void Opm::Action::Value::add_well | ( | std::string_view | well, |
| double | value | ||
| ) |
Incorporate well level function value into Value object.
Will throw an exception of type std::invalid_argument if
was created as a scalar object.
| [in] | well | Named well for which to incorporate a function value. |
| [in] | value | Numeric function value for well. |
| Opm::Action::Result Opm::Action::Value::eval_cmp | ( | TokenType | op, |
| const Value & | rhs | ||
| ) | const |
Compare current Value to another Value.
| [in] | op | Comparison operator. Must be one of
|
| [in] | rhs | Value object against which *this
op. Should be a scalar value. The rhs object will be used on the right-hand side of the comparison operator while *this
op. Function eval_cmp() will throw an exception of type std::invalid_argument if rhs is not a scalar Value object. |
| double Opm::Action::Value::scalar | ( | ) | const |
Retrieve scalar function value.
Will throw an exception of type std::invalid_argument if
was not created as a scalar object.