template<typename T>
MathEval class
| Template parameters | |
|---|---|
| T | the type to evaluate to |
Contents
- Reference
Utility to evaluate simple math expressions
Public functions
Function documentation
template<typename T>
T bpf:: MathEval<T>:: Evaluate(const String& str)
| Parameters | |
|---|---|
| str | the expression string |
| Returns | evaluated number |
| Exceptions | |
| EvalException | when there is a math error |
Evaluates a math expression string
template<typename T>
T bpf:: MathEval<T>:: EvalNbr(const String& str,
fsize& endpos)
| Parameters | |
|---|---|
| str | the string containing the number |
| endpos | output position in str where the last character could be found |
| Returns | parsed number |
Parses a number at the start of a string and return how many characters were read
template<typename T>
T bpf:: MathEval<T>:: EvalNbr(const String& str,
const fsize startpos,
fsize& endpos)
| Parameters | |
|---|---|
| str | the string containing the number |
| startpos | the start position in the string |
| endpos | output position in str where the last character could be found |
| Returns | parsed number |
| Exceptions | |
| IndexException | when startpos is out of the string bounds |
Parses a number at a given position in a string and return how many characters were read