21 #ifndef FXEXPRESSION_H 22 #define FXEXPRESSION_H 87 static const FXuchar initial[];
88 static const FXchar *
const errors[];
114 FXExpression(
const FXchar* expression,
const FXchar* variables=
nullptr,Error* error=
nullptr);
123 FXbool
empty()
const {
return (code==initial); }
130 FXdouble evaluate(
const FXdouble *args=
nullptr)
const;
139 Error parse(
const FXchar* expression,
const FXchar* variables=
nullptr);
140 Error parse(
const FXString& expression,
const FXString& variables=FXString::null);
158 extern FXAPI FXStream& operator<<(FXStream& store,
const FXExpression& s);
159 extern FXAPI FXStream& operator>>(FXStream& store,FXExpression& s);
More characters after input.
Definition: FXExpression.h:96
Unknown identifier.
Definition: FXExpression.h:101
static const FXchar * getError(Error err)
Returns error code for given error.
Definition: FXExpression.h:143
Illegal token.
Definition: FXExpression.h:99
Out of memory.
Definition: FXExpression.h:97
Expected comma.
Definition: FXExpression.h:100
Empty input.
Definition: FXExpression.h:95
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:81
Definition: FX4Splitter.h:28
Unmatched parentheses.
Definition: FXExpression.h:98
FXbool empty() const
See if expression is empty.
Definition: FXExpression.h:123
Error
Expression error codes.
Definition: FXExpression.h:92
No errors.
Definition: FXExpression.h:94
Expression compiles a simple numerical expression into efficient byte-code for repeated evaluation...
Definition: FXExpression.h:83
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42