xtd 1.0.0
Loading...
Searching...
No Matches
xtd::expressions Namespace Reference

Definition

The xtd::expressions namespace provides a lightweight, composable expression template framework for building and evaluating lazy, strongly-typed functional expressions from arbitrary callables.

Classes

struct  add
 The xtd::expressions::add is the add expression. More...
struct  and_
 The xtd::expressions::and_ is the bitwise and expression. More...
struct  args
 Generates a set of positional args that can be decomposed using structured bindings to build readable and composable expression templates. More...
struct  argument
 The xtd::expressions::arg object is arg for all expressions. More...
struct  argument_expression
 The xtd::expressions::argument_expression is the base class for xtd::expressions::arg. More...
struct  binary_expression
 The xtd::expressions::binary_expression is the base class for xtd::expressions::arg. More...
struct  compare_three_way
 The xtd::expressions::compare_three_way is the three_way_comparison expression. More...
struct  conditional_expression
 The xtd::expressions::conditional_expression is the base class for xtd::expressions::arg. More...
struct  constant
 The xtd::expressions::constant is the constant wrapper. More...
struct  divide
 The xtd::expressions::divide is the division expression. More...
struct  equal
 The xtd::expressions::equal is the equal expression. More...
struct  expression
 Provides the base class from which the classes that represent expression tree nodes are derived. It also contains static factory methods to create the various node types. This is an abstract class. More...
struct  expression_stream
 The xtd::expressions::expression_stream is the streamable class for expression objects. More...
struct  greater_than
 The xtd::expressions::greater_than is the greater expression. More...
struct  greater_than_or_equal
 The xtd::expressions::greater_than_or_equal is the greater or equal expression. More...
struct  if_then_else_expression
 The xtd::expressions::if_then_else_expression is the addition expression. More...
struct  invocation_expression
 The xtd::expressions::invocation_expression is the base class for xtd::expressions::arg. More...
struct  left_shift
 The xtd::expressions::left_shift is the bitwise left expression. More...
struct  less_than
 The xtd::expressions::less_than is the less expression. More...
struct  less_than_or_equal
 The xtd::expressions::less_than_or_equal is the less or equal expression. More...
struct  logical_and
 The xtd::expressions::logical_and is the and alse expression. More...
struct  logical_not
 The xtd::expressions::logical_not is the not expression. More...
struct  logical_or
 The xtd::expressions::logical_or is the or expression. More...
struct  member_expression
 The xtd::expressions::as_expression method convert a type as xtd::expressions::expression or xtd::expressions::constant. More...
struct  member_type
 The xtd::expressions::member_type contains the member type. More...
struct  method_call_expression
 The xtd::expressions::as_expression method convert a type as xtd::expressions::expression or xtd::expressions::constant. More...
struct  method_type
 The xtd::expressions::method_type contains the method type. More...
struct  modulo
 The xtd::expressions::modulo is the modulo expression. More...
struct  multiply
 The xtd::expressions::multiply is the multiplication expression. More...
struct  not_
 The xtd::expressions::not_ is the bitwise not expression. More...
struct  not_equal
 The xtd::expressions::not_equal is the not equal expression. More...
struct  or_
 The xtd::expressions::or_ is the bitwise or expression. More...
struct  right_shift
 The xtd::expressions::right_shift is the bitwise right expression. More...
struct  subtract_expression
 The xtd::expressions::subtract_expression is the subtract expression. More...
struct  unary_expression
 The xtd::expressions::unary_expression is the base class for xtd::expressions::arg. More...
struct  unary_minus_expression
 The xtd::expressions::unary_minus_expression is the unary minus expression. More...
struct  unary_plus_expression
 The xtd::expressions::unary_plus_expression is the unary plus expression. More...
struct  value
 The xtd::expressions::value is the value wrapper. More...
struct  value_expression
 The xtd::expressions::value_expression is the base class for xtd::expressions::arg. More...
struct  xor_
 The xtd::expressions::xor_ is the bitwise xor expression. More...

Enumerations

enum class  operator_precedence {
  operator_precedence::highest ,
  operator_precedence::arg ,
  operator_precedence::constant ,
  operator_precedence::value ,
  operator_precedence::scope_resolution ,
  operator_precedence::postfix_increment ,
  operator_precedence::postfix_decrement ,
  operator_precedence::functional_cast ,
  operator_precedence::function_call ,
  operator_precedence::subscript ,
  operator_precedence::member_access ,
  operator_precedence::method_access ,
  operator_precedence::prefix_increment ,
  operator_precedence::prefix_decrement ,
  operator_precedence::unary_plus ,
  operator_precedence::unary_minus ,
  operator_precedence::logical_not ,
  operator_precedence::bitwise_not ,
  operator_precedence::c_ctyle_cast ,
  operator_precedence::indirection ,
  operator_precedence::address_of ,
  operator_precedence::reflection ,
  operator_precedence::size_of ,
  operator_precedence::await ,
  operator_precedence::new_allocation ,
  operator_precedence::delete_dallocation ,
  operator_precedence::pointer_to_member ,
  operator_precedence::multiplication ,
  operator_precedence::division ,
  operator_precedence::modulo ,
  operator_precedence::addition ,
  operator_precedence::subtraction ,
  operator_precedence::bitwise_left ,
  operator_precedence::bitwise_right ,
  operator_precedence::three_way_comparison ,
  operator_precedence::relational ,
  operator_precedence::less ,
  operator_precedence::less_or_equal ,
  operator_precedence::greater ,
  operator_precedence::greater_or_equal ,
  operator_precedence::equality ,
  operator_precedence::equal ,
  operator_precedence::not_equal ,
  operator_precedence::bitwise_and ,
  operator_precedence::bitwise_xor ,
  operator_precedence::bitwise_or ,
  operator_precedence::logical_and ,
  operator_precedence::logical_or ,
  operator_precedence::ternary ,
  operator_precedence::throws ,
  operator_precedence::yield ,
  operator_precedence::assignment ,
  operator_precedence::compound_assignment ,
  operator_precedence::compound_sum_assignment ,
  operator_precedence::compound_difference_assignment ,
  operator_precedence::compound_product_assignment ,
  operator_precedence::compound_quotient_assignment ,
  operator_precedence::compound_modulo_assignment ,
  operator_precedence::compound_bitwise_left_assignment ,
  operator_precedence::compound_bitwise_right_assignment ,
  operator_precedence::compound_bitwise_and_assignment ,
  operator_precedence::compound_bitwise_xor_assignment ,
  operator_precedence::compound_bitwise_or_assignment ,
  operator_precedence::comma ,
  operator_precedence::lowest
}
 Specifies the operator precedence. More...

Functions

template<typename member_t>
constexpr auto member (member_t member)
 The xtd::expressions::member is use to bind object member.
template<typename member_t>
constexpr auto member (const char *name, member_t member)
 The xtd::expressions::member is use to bind object member.
template<typename method_t, typename... args_t>
constexpr auto method (method_t method, args_t &&... args)
 The xtd::expressions::method is use to bind object method.
template<typename method_t, typename... args_t>
constexpr auto method (const char *name, method_t method, args_t &&... args)
 The xtd::expressions::method is use to bind object method.

Variables

template<size_t index>
constexpr argument< indexarg
 Gets the index argument used by expression.

Public Variables

constexpr auto _
 The xtd::expressions::_ arg instance is used by expression that have only one argument.
constexpr auto _1
 The xtd::expressions::_1 arg instance is first argument used by expression.
constexpr auto _2
 The xtd::expressions::_2 arg instance is second argument used by expression.
constexpr auto _3
 The xtd::expressions::_3 arg instance is third argument used by expression.
constexpr auto _4
 The xtd::expressions::_4 arg instance is fourth argument used by expression.
constexpr auto _5
 The xtd::expressions::_5 arg instance is fifth argument used by expression.
constexpr auto _6
 The xtd::expressions::_6 arg instance is sixth argument used by expression.
constexpr auto _7
 The xtd::expressions::_7 arg instance is seventh argument used by expression.
constexpr auto _8
 The xtd::expressions::_8 arg instance is eighth argument used by expression.
constexpr auto _9
 The xtd::expressions::_9 arg instance is ninth argument used by expression.
constexpr auto _10
 The xtd::expressions::_10 arg instance is tenth argument used by expression.

Public Operators

template<typename left_t, typename right_t>
requires expression_operand<left_t> || expression_operand<right_t>
constexpr auto operator+ (left_t left, right_t right)
 Add the specified left and right operands.
template<typename left_t, typename right_t>
requires expression_operand<left_t> || expression_operand<right_t>
constexpr auto operator& (left_t left, right_t right)
 Subtract the specified left and right operands.
template<typename left_t, typename right_t>
requires expression_operand<left_t> || expression_operand<right_t>
constexpr auto operator<=> (left_t left, right_t right)
 Equal to the specified left and right operands.
template<typename left_t, typename right_t>
requires expression_operand<left_t> || expression_operand<right_t>
constexpr auto operator/ (left_t left, right_t right)
 Divide the specified left and right operands.
template<typename left_t, typename right_t>
requires expression_operand<left_t> || expression_operand<right_t>
constexpr auto operator== (left_t left, right_t right)
 Equal to the specified left and right operands.
template<typename left_t, typename right_t>
requires expression_operand<left_t> || expression_operand<right_t>
constexpr auto operator> (left_t left, right_t right)
 Equal to the specified left and right operands.
template<typename left_t, typename right_t>
requires expression_operand<left_t> || expression_operand<right_t>
constexpr auto operator>= (left_t left, right_t right)
 Equal to the specified left and right operands.
template<typename condition_t, typename then_t, typename else_t>
requires expression_operand<condition_t> || expression_operand<then_t> || expression_operand<else_t>
constexpr auto if_then_else (condition_t condition, then_t then_, else_t else_)
 If condition is true return then_ else retur nelse_.
template<typename left_t, typename right_t>
requires (expression_operand<left_t> || expression_operand<right_t>) && (!std::is_base_of_v<std::ostream, std::remove_reference_t
<left_t>>)
constexpr auto operator<< (left_t left, right_t right)
 Subtract the specified left and right operands.
template<typename left_t, typename right_t>
requires expression_operand<left_t> || expression_operand<right_t>
constexpr auto operator< (left_t left, right_t right)
 Equal to the specified left and right operands.
template<typename left_t, typename right_t>
requires expression_operand<left_t> || expression_operand<right_t>
constexpr auto operator<= (left_t left, right_t right)
 Equal to the specified left and right operands.
template<typename left_t, typename right_t>
requires expression_operand<left_t> || expression_operand<right_t>
constexpr auto operator&& (left_t left, right_t right)
 Equal to the specified left and right operands.
template<typename value_t>
requires expression_operand<value_t>
constexpr auto operator! (value_t value)
 Add the specified left and right operands.
template<typename left_t, typename right_t>
requires expression_operand<left_t> || expression_operand<right_t>
constexpr auto operator|| (left_t left, right_t right)
 Equal to the specified left and right operands.
template<typename expression_t, typename member_t>
requires expression_operand<expression_t> || expression_operand<member_type<member_t>>
constexpr auto operator* (expression_t expression, member_type< member_t > member)
 Bind member operator.
template<typename expression_t, typename member_t>
requires expression_operand<expression_t> || expression_operand<member_type<member_t>>
constexpr auto operator| (expression_t expression, member_type< member_t > member)
 Bind member operator.
template<typename expression_t, typename method_t, typename... stored_args_t>
requires expression_operand<expression_t> || expression_operand<method_type<method_t, stored_args_t...>>
constexpr auto operator* (expression_t expression, method_type< method_t, stored_args_t... > method)
 Bind method operator.
template<typename expression_t, typename method_t, typename... stored_args_t>
requires expression_operand<expression_t> || expression_operand<method_type<method_t, stored_args_t...>>
constexpr auto operator| (expression_t expression, method_type< method_t, stored_args_t... > method)
 Bind method alternative operator.
template<typename left_t, typename right_t>
requires expression_operand<left_t> || expression_operand<right_t>
constexpr auto operator% (left_t left, right_t right)
 Performs a modulo on the specified left and right operands.
template<typename left_t, typename right_t>
requires expression_operand<left_t> || expression_operand<right_t>
constexpr auto operator* (left_t left, right_t right)
 Multiply the specified left and right operands.
template<typename value_t>
requires expression_operand<value_t>
constexpr auto operator~ (value_t value)
 Add the specified left and right operands.
template<typename left_t, typename right_t>
requires expression_operand<left_t> || expression_operand<right_t>
constexpr auto operator!= (left_t left, right_t right)
 Equal to the specified left and right operands.
template<typename left_t, typename right_t>
requires expression_operand<left_t> || expression_operand<right_t>
constexpr auto operator| (left_t left, right_t right)
 Subtract the specified left and right operands.
template<typename left_t, typename right_t>
requires (expression_operand<left_t> || expression_operand<right_t>) && (!std::is_base_of_v<std::istream, std::remove_reference_t
<left_t>>)
constexpr auto operator>> (left_t left, right_t right)
 Subtract the specified left and right operands.
template<typename left_t, typename right_t>
requires expression_operand<left_t> || expression_operand<right_t>
constexpr auto operator- (left_t left, right_t right)
 Subtract the specified left and right operands.
template<typename value_t>
requires expression_operand<value_t>
constexpr auto operator- (value_t value)
 Add the specified left and right operands.
template<typename value_t>
requires expression_operand<value_t>
constexpr auto operator+ (value_t value)
 Add the specified left and right operands.
template<typename left_t, typename right_t>
requires expression_operand<left_t> || expression_operand<right_t>
constexpr auto operator^ (left_t left, right_t right)
 Subtract the specified left and right operands.

Public Functions

template<typename type_t>
requires expression_operand<type_t>
constexpr decltype(auto) as_expression (type_t &&value)
 The xtd::expressions::as_expression method convert a type as xtd::expressions::expression.
template<typename type_t>
requires (!expression_operand<type_t>)
constexpr auto as_expression (type_t &&value)
 The xtd::expressions::as_expression method convert a type as xtd::expressions::value.