Bridge++
Ver. 1.3.x
|
EvalExpr class for algebraic expression in parameter strings. More...
#include <evalexpr.h>
Public Types | |
typedef yy::parser::semantic_type | semantic_type |
typedef yy::parser::token | token |
Public Member Functions | |
EvalExpr (const std::string &line, bool debug=false) | |
int | next_token (semantic_type &yylval) |
double | parse () |
double | get_symbol_value (char const *name) |
function_t | get_symbol_function (char const *name) |
void | set_result (double result) |
void | error (const std::string &msg) |
Private Attributes | |
const std::string | m_src |
unsigned int | m_pos |
double | m_result |
bool | m_trace |
Static Private Attributes | |
static SymbolTable | global_symbol_table = init_global_symbol() |
EvalExpr class for algebraic expression in parameter strings.
EvalExpr class provides support to evaluating algebraic expressions in parameter strings. The expression is evaluated into a single double precision value.
Supported expression includes arithmetic operations in in-fix notation, several transcendental functions including trigonometric and logarithmic functions, and numerical constant such as pi.
Definition at line 39 of file evalexpr.h.
Definition at line 43 of file evalexpr.h.
typedef yy::parser::token EvalExpr::token |
Definition at line 44 of file evalexpr.h.
|
inline |
Definition at line 46 of file evalexpr.h.
void EvalExpr::error | ( | const std::string & | msg | ) |
Definition at line 233 of file evalexpr.cpp.
function_t EvalExpr::get_symbol_function | ( | char const * | name | ) |
Definition at line 226 of file evalexpr.cpp.
double EvalExpr::get_symbol_value | ( | char const * | name | ) |
Definition at line 219 of file evalexpr.cpp.
int EvalExpr::next_token | ( | semantic_type & | yylval | ) |
Definition at line 64 of file evalexpr.cpp.
double EvalExpr::parse | ( | ) |
Definition at line 191 of file evalexpr.cpp.
void EvalExpr::set_result | ( | double | result | ) |
Definition at line 210 of file evalexpr.cpp.
|
staticprivate |
Definition at line 74 of file evalexpr.h.
|
private |
Definition at line 69 of file evalexpr.h.
|
private |
Definition at line 70 of file evalexpr.h.
|
private |
Definition at line 68 of file evalexpr.h.
|
private |
Definition at line 72 of file evalexpr.h.