|
Bridge++
Ver. 1.1.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 38 of file evalexpr.h.
Definition at line 42 of file evalexpr.h.
| typedef yy::parser::token EvalExpr::token |
Definition at line 43 of file evalexpr.h.
|
inline |
Definition at line 45 of file evalexpr.h.
| void EvalExpr::error | ( | const std::string & | msg | ) |
Definition at line 224 of file evalexpr.cpp.
| function_t EvalExpr::get_symbol_function | ( | char const * | name | ) |
Definition at line 218 of file evalexpr.cpp.
| double EvalExpr::get_symbol_value | ( | char const * | name | ) |
Definition at line 212 of file evalexpr.cpp.
| int EvalExpr::next_token | ( | semantic_type & | yylval | ) |
Definition at line 61 of file evalexpr.cpp.
| double EvalExpr::parse | ( | ) |
Definition at line 186 of file evalexpr.cpp.
| void EvalExpr::set_result | ( | double | result | ) |
Definition at line 204 of file evalexpr.cpp.
|
staticprivate |
Definition at line 73 of file evalexpr.h.
|
private |
Definition at line 68 of file evalexpr.h.
|
private |
Definition at line 69 of file evalexpr.h.
|
private |
Definition at line 67 of file evalexpr.h.
|
private |
Definition at line 71 of file evalexpr.h.