![]() |
LibrePCB Developers Documentation
|
Mathematical expression parser. More...
#include <mathparser.h>
Collaboration diagram for MathParser:Classes | |
| struct | Result |
Public Member Functions | |
| MathParser () noexcept | |
| MathParser (const MathParser &other)=delete | |
| virtual | ~MathParser () noexcept |
| void | setLocale (const QLocale &locale) noexcept |
| Set the locale to be used for parsing numbers. | |
| Result | parse (QString expression) const noexcept |
| Parse expression. | |
| MathParser & | operator= (const MathParser &rhs)=delete |
Private Attributes | |
| QLocale | mLocale |
| The locale used for parsing numbers. | |
Mathematical expression parser.
This class interprets mathematical expression strings (e.g. "2+3") and returns the result of the calculation. It is actually only a wrapper around the muparser library, so take a look at its documentation for details.
|
noexcept |
|
delete |
|
virtualnoexcept |
|
noexcept |
Set the locale to be used for parsing numbers.
This sets the thousand separator and decimal point to be used for the evaluation.
| locale | The locale to use. |
|
noexcept |
Parse expression.
| expression | The expression to parse. |
Here is the caller graph for this function:
|
delete |
|
private |
The locale used for parsing numbers.