Class zmbt::Expression¶
ClassList > zmbt > Expression
#include <expression.hpp>
Inherited by the following classes: zmbt::dsl::SignatureBase
Classes¶
Type | Name |
---|---|
struct | EvalContext Expression evaluation context. |
struct | EvalLog Expression evaluation log. |
Public Types¶
Type | Name |
---|---|
typedef dsl::Keyword | Keyword |
typedef boost::json::value | V |
Public Functions¶
Type | Name |
---|---|
Expression (std::initializer_list< boost::json::value_ref > items) |
|
Expression (boost::json::value const & expr) |
|
Expression (Keyword const & keyword, boost::json::value const & params) |
|
Expression (Keyword const & keyword) |
|
Expression () |
|
Expression (T const & sample) |
|
Expression (Expression const & o) |
|
Expression (Expression && o) |
|
boost::json::value | eval (boost::json::value const & x=nullptr, EvalContext const & ctx={}) const Evaluate expression. |
bool | has_params () const |
bool | is (Keyword const kwrd) const |
bool | is_const () const |
bool | is_literal () const |
bool | is_noop () const |
Keyword | keyword () const |
bool | match (boost::json::value const & observed, SignalOperatorHandler const & op={}) const |
bool | operator!= (Expression const & o) const |
Expression & | operator= (Expression const & o) |
Expression & | operator= (Expression && o) |
bool | operator== (Expression const & o) const |
boost::json::value const & | params () const |
boost::json::value const & | serialize () const |
boost::json::value const & | subexpr () const |
boost::json::value const & | underlying () const |
~Expression () = default |
Public Static Functions¶
Type | Name |
---|---|
Expression | constAsEq (boost::json::value const & underlying) |
Expression | literalAsEq (boost::json::value const & underlying) |
Detailed Description¶
Expression DSL implementation class.
See also: Expression DSL documentation.
Public Types Documentation¶
typedef Keyword¶
typedef V¶
Public Functions Documentation¶
function Expression [3/10]¶
function Expression [4/10]¶
function Expression [5/10]¶
function Expression [6/10]¶
function Expression [7/10]¶
function Expression [8/10]¶
function Expression [9/10]¶
function Expression [10/10]¶
function eval¶
Evaluate expression.
boost::json::value zmbt::Expression::eval (
boost::json::value const & x=nullptr,
EvalContext const & ctx={}
) const
Parameters:
x
run-time argumentconfig
evaluation config
Returns:
function has_params¶
function is¶
function is_const¶
function is_literal¶
function is_noop¶
function keyword¶
function match¶
bool zmbt::Expression::match (
boost::json::value const & observed,
SignalOperatorHandler const & op={}
) const
function operator!=¶
function operator=¶
function operator=¶
function operator==¶
function params¶
function serialize¶
function subexpr¶
function underlying¶
function ~Expression¶
Public Static Functions Documentation¶
function constAsEq¶
function literalAsEq¶
Friends Documentation¶
friend operator&¶
Pack expression results into an array.
See also: zmbt::expr::Pack.
friend operator<<¶
Apply x to lhs expression.
Bind x as a run-time argument to lhs expr. Equivalent to Apply(expr, x).
See also: zmbt::expr::Apply Note that operator << precedence is higher than pipe operator, so lhs expression should be wrapped in parentheses if it contains other operators.
friend operator>>¶
Evaluate x to lhs expression.
Equivalent to expr.eval(x).
friend operator|¶
Compose expressions left-to-right.
Pipe functional expressions in composition, s.t. a | b
is equivalent to Compose(b, a)
.
See also: zmbt::expr::Compose
The documentation for this class was generated from the following file zmbt-framework/zmbt-framework/backends/cxx/include/zmbt/model/expression.hpp