HRCore V1.1.0
A High Resolution Calculation Library
|
A class to get and evaluate expression. More...
Public Member Functions | |
Expression (U *helper=nullptr) | |
bool | eval () |
Evaluate the expression. More... | |
T | getResult () |
Get the Result object. Make sure eval() returned true first, otherwise Segment Fault! More... | |
Friends | |
std::istream & | operator>> (std::istream &is, Expression< T, U > &rhs) |
Convert a stream into an expression. More... | |
std::ostream & | operator<< (std::ostream &os, Expression< T, U > &rhs) |
Output the value of an expression. More... | |
A class to get and evaluate expression.
T | Data type, choose from 'Integer' and 'Float' |
U | Storage implement type |
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
|
friend |
Convert a stream into an expression.
The function will reads std::istream object until EOF. If something invalid read, throw Exception::ExpressionConvertFailed.