stator
A math, geometry, and utility library
Public Types | Public Member Functions | List of all members
sym::Expr Struct Reference

The generic holder/smart pointer for a runtime Abstract Syntax Tree (AST) (expression). More...

#include <runtime.hpp>

Inheritance diagram for sym::Expr:
sym::SymbolicOperator

Public Types

typedef shared_ptr< const RTBaseBase
 

Public Member Functions

 Expr ()
 
 Expr (const std::shared_ptr< const RTBase > &p)
 
 Expr (const char *)
 
 Expr (const std::string &)
 
 Expr (const RTBase &)
 
 Expr (const double &)
 
template<std::intmax_t Num, std::intmax_t Denom>
 Expr (const C< Num, Denom > &c)
 
template<typename ... Args>
 Expr (const Var< Args... > v)
 
template<class Op , class Arg_t >
 Expr (const UnaryOp< Arg_t, Op > &)
 
template<class LHS_t , class Op , class RHS_t >
 Expr (const BinaryOp< LHS_t, Op, RHS_t > &)
 
 Expr (const detail::NoIdentity &)
 
template<class T >
as () const
 
 operator bool () const
 
bool operator!= (const Expr &o) const
 
bool operator== (const Expr &) const
 
bool operator== (const detail::NoIdentity &) const
 

Detailed Description

This class is simply a smart pointer, with specialised constructors to allow it to convert compile-time expressions (and formula strings) into runtime forms. It also inherits from SymbolicOperator and can be used in compile-time expressions.

Definition at line 68 of file runtime.hpp.

Member Typedef Documentation

◆ Base

typedef shared_ptr<const RTBase> sym::Expr::Base

Definition at line 69 of file runtime.hpp.

Constructor & Destructor Documentation

◆ Expr() [1/11]

sym::Expr::Expr ( )
inline

Definition at line 71 of file runtime.hpp.

◆ Expr() [2/11]

sym::Expr::Expr ( const std::shared_ptr< const RTBase > &  p)
inline

Definition at line 72 of file runtime.hpp.

◆ Expr() [3/11]

sym::Expr::Expr ( const char *  str)

Definition at line 447 of file parser.hpp.

◆ Expr() [4/11]

sym::Expr::Expr ( const std::string &  str)

Definition at line 437 of file parser.hpp.

◆ Expr() [5/11]

sym::Expr::Expr ( const RTBase v)
inline

Definition at line 343 of file runtime.hpp.

◆ Expr() [6/11]

sym::Expr::Expr ( const double &  v)
inline

Definition at line 345 of file runtime.hpp.

◆ Expr() [7/11]

template<std::intmax_t Num, std::intmax_t Denom>
sym::Expr::Expr ( const C< Num, Denom > &  c)

Definition at line 348 of file runtime.hpp.

◆ Expr() [8/11]

template<typename ... Args>
sym::Expr::Expr ( const Var< Args... >  v)

Definition at line 357 of file runtime.hpp.

◆ Expr() [9/11]

template<class Op, class Arg_t>
sym::Expr::Expr ( const UnaryOp< Arg_t, Op > &  op)

Definition at line 351 of file runtime.hpp.

◆ Expr() [10/11]

template<class LHS_t, class Op, class RHS_t >
sym::Expr::Expr ( const BinaryOp< LHS_t, Op, RHS_t > &  op)

Definition at line 354 of file runtime.hpp.

◆ Expr() [11/11]

sym::Expr::Expr ( const detail::NoIdentity )
inline

Definition at line 93 of file runtime.hpp.

Member Function Documentation

◆ as()

template<class T >
T sym::Expr::as ( ) const

Definition at line 360 of file runtime.hpp.

◆ operator bool()

sym::Expr::operator bool ( ) const
inlineexplicit

Definition at line 98 of file runtime.hpp.

◆ operator!=()

bool sym::Expr::operator!= ( const Expr o) const
inline

Definition at line 96 of file runtime.hpp.

◆ operator==() [1/2]

bool sym::Expr::operator== ( const Expr e) const
inline

Definition at line 368 of file runtime.hpp.

◆ operator==() [2/2]

bool sym::Expr::operator== ( const detail::NoIdentity ) const
inline

Definition at line 97 of file runtime.hpp.


The documentation for this struct was generated from the following files: