LibrePCB Developers Documentation
|
Mathematical expression parser. More...
#include <mathparser.h>
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. More... | |
Result | parse (const QString &expression) const noexcept |
Parse expression. More... | |
MathParser & | operator= (const MathParser &rhs)=delete |
Private Attributes | |
QLocale | mLocale |
The locale used for parsing numbers. More... | |
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. |
|
delete |
|
private |
The locale used for parsing numbers.