Class zmbt::lang::ExpressionView¶
ClassList > zmbt > lang > ExpressionView
#include <expression.hpp>
Inherited by the following classes: zmbt::lang::Expression
Public Types¶
Type | Name |
---|---|
typedef lang::Keyword | Keyword |
typedef boost::json::value | V |
Public Functions¶
Type | Name |
---|---|
ExpressionView () |
|
ExpressionView (ExpressionView const &) = default |
|
ExpressionView (ExpressionView &&) = default |
|
ExpressionView (EncodingView v) |
|
ExpressionView (Encoding enc) |
|
boost::json::array const & | as_array () const |
bool | as_bool () const |
boost::json::object const & | as_object () const |
boost::json::string const & | as_string () const |
boost::json::value const & | data () const |
EncodingView | encoding_view () const |
boost::json::value | eval (boost::json::value const & x=nullptr, EvalContext ctx={}) const Evaluate expression. |
bool | eval_as_predicate (ExpressionView const & x, Expression & err_sts, EvalContext ctx) const |
bool | eval_as_predicate (boost::json::value const & x, Expression & err_sts, EvalContext ctx) const |
Expression | eval_e (ExpressionView const & x, EvalContext ctx) const Evaluate expression. |
Expression | eval_maybe_predicate (ExpressionView const & x, EvalContext ctx) const |
bool | has_subexpr () const |
boost::json::array const * | if_array () const |
bool const * | if_bool () const |
boost::json::object const * | if_object () const |
boost::json::string const * | if_string () const |
bool | is (Keyword const kwrd) const |
bool | is_boolean () const |
bool | is_complete_flip () const |
bool | is_compose () const |
bool | is_const () const |
bool | is_error () const |
bool | is_fork () const |
bool | is_infix_fork () const |
bool | is_infix_pipe () const |
bool | is_infix_tuple () const |
bool | is_link () const |
bool | is_literal () const |
bool | is_noop () const |
bool | is_null () const |
bool | is_preproc () const |
bool | is_tuple () const |
bool | is_valid_link () const |
Keyword | keyword () const |
boost::json::string_view | keyword_to_str () const |
bool | match (boost::json::value const & x, Operator const & op={}) const Eval and cast to boolean, return false on error. |
bool | operator!= (ExpressionView const & o) const |
ExpressionView & | operator= (ExpressionView const &) = default |
ExpressionView & | operator= (ExpressionView &&) = default |
bool | operator== (ExpressionView const & o) const |
std::list< std::pair< std::string, std::string > > | preprocessing_parameters () const List of [param, json ptr]. |
std::string | prettify () const |
std::ostream & | prettify_to (std::ostream & os) const |
void | prettify_to (char(&) buff) const |
void | prettify_to (char * buff, std::size_t n) const |
std::string | serialize () const |
std::list< ExpressionView > | subexpressions_list () const Subexpressions. |
boost::json::value | to_json () const |
std::list< ExpressionView > | tuple_parameters () const |
virtual | ~ExpressionView () = default |
Protected Attributes¶
Type | Name |
---|---|
EncodingView | encoding_view_ |
Detailed Description¶
Expression Language implementation class.
See also: Expression Language documentation.
Public Types Documentation¶
typedef Keyword¶
typedef V¶
Public Functions Documentation¶
function ExpressionView [1/5]¶
function ExpressionView [2/5]¶
function ExpressionView [3/5]¶
function ExpressionView [4/5]¶
function ExpressionView [5/5]¶
function as_array¶
function as_bool¶
function as_object¶
function as_string¶
function data¶
function encoding_view¶
function eval¶
Evaluate expression.
boost::json::value zmbt::lang::ExpressionView::eval (
boost::json::value const & x=nullptr,
EvalContext ctx={}
) const
Parameters:
x
run-time argumentctx
evaluation context
Returns:
function eval_as_predicate [1/2]¶
bool zmbt::lang::ExpressionView::eval_as_predicate (
ExpressionView const & x,
Expression & err_sts,
EvalContext ctx
) const
Eval const expressions as Eq(expr), except for Noop, otherwise eval expr.
function eval_as_predicate [2/2]¶
bool zmbt::lang::ExpressionView::eval_as_predicate (
boost::json::value const & x,
Expression & err_sts,
EvalContext ctx
) const
Eval const expressions as Eq(expr), except for Noop, otherwise eval expr. Store result in arg reference and return error status.
function eval_e¶
Evaluate expression.
Parameters:
x
run-time argumentctx
evaluation context
Returns:
function eval_maybe_predicate¶
Expression zmbt::lang::ExpressionView::eval_maybe_predicate (
ExpressionView const & x,
EvalContext ctx
) const
function has_subexpr¶
function if_array¶
function if_bool¶
function if_object¶
function if_string¶
function is¶
function is_boolean¶
function is_complete_flip¶
function is_compose¶
function is_const¶
function is_error¶
function is_fork¶
function is_infix_fork¶
function is_infix_pipe¶
function is_infix_tuple¶
function is_link¶
function is_literal¶
function is_noop¶
function is_null¶
function is_preproc¶
function is_tuple¶
function is_valid_link¶
function keyword¶
function keyword_to_str¶
function match¶
Eval and cast to boolean, return false on error.
bool zmbt::lang::ExpressionView::match (
boost::json::value const & x,
Operator const & op={}
) const
function operator!=¶
function operator=¶
function operator=¶
function operator==¶
function preprocessing_parameters¶
List of [param, json ptr].
std::list< std::pair< std::string, std::string > > zmbt::lang::ExpressionView::preprocessing_parameters () const
function prettify¶
function prettify_to [1/3]¶
function prettify_to [2/3]¶
function prettify_to [3/3]¶
function serialize¶
function subexpressions_list¶
Subexpressions.
function to_json¶
function tuple_parameters¶
function ~ExpressionView¶
Protected Attributes Documentation¶
variable encoding_view_¶
Friends Documentation¶
friend operator*¶
Evaluate x to lhs expression.
Equivalent to expr.eval(x).
friend operator*¶
Evaluate expression.
Equivalent to expr.eval().
friend operator<<¶
std::ostream & zmbt::lang::ExpressionView::operator<< (
std::ostream & os,
ExpressionView const & expr
)
friend operator<<¶
zmbt::Logger & zmbt::lang::ExpressionView::operator<< (
zmbt::Logger & logger,
ExpressionView const & expr
)
The documentation for this class was generated from the following file zmbt-framework/zmbt-framework/backends/cxx/include/zmbt/expr/expression.hpp