Classes | |
class | AnyType |
this type is not actually used, its ID is used as a fallback to tell operators, functions and engines that any supported type can be used More... | |
class | BinaryOperator |
Wraps a particular binary operator. More... | |
class | BoolEngine |
A boolean and logic math enabled engine. More... | |
class | CharacterClassSettings |
This class holds the character classes used by an Engine. More... | |
class | Engine |
The calculation engine of . More... | |
class | Exception |
Objects of this class represent an exception in the evaluation of an ELAM expression. More... | |
class | Expression |
Represents an expression in the context of its engine. More... | |
class | FloatEngine |
an engine that has floating point (double) numbers implemented More... | |
class | IntEngine |
integer math enabled engine More... | |
class | IntFloatEngine |
an engine with integer and float math pre-installed, see IntEngine and FloatEngine More... | |
class | Position |
A character position inside a text/string that is being evaluated. More... | |
class | StringEngine |
integer math enabled engine More... | |
class | Token |
Represents a single token in a parsed expression. More... | |
class | UnaryOperator |
Wraps a particular unary operator. More... | |
Typedefs | |
typedef std::function < QVariant(const QVariant &op1, const QVariant &op2, Engine &engine)> | BinaryOperatorCall |
pointer to a function wrapping a binary operator More... | |
typedef QVariant(* | BinaryOperatorCall_FP )(const QVariant &op1, const QVariant &op2, Engine &engine) |
Helper type to select the correct overload from several variants. More... | |
typedef std::function < QVariant(const QList < QVariant > &args, Engine &engine)> | Function |
pointer to a function wrapping a mathematical function More... | |
typedef QVariant(* | Function_FP )(const QList< QVariant > &args, Engine &engine) |
Helper type to select the correct overload from several variants. More... | |
typedef std::function< QPair < QString, QVariant >const QString &expr, Engine &engine, int start)> | LiteralParser |
wraps the parser routine for a literal More... | |
typedef QPair< QString, QVariant >(* | LiteralParser_FP )(const QString &expr, Engine &engine, int start) |
Helper type to select the correct overload from several variants. More... | |
typedef std::function < QVariant(const QVariant &orig, const Engine &engine)> | TypeCast |
Wraps a cast function to convert various types into another type. More... | |
typedef QVariant(* | TypeCast_FP )(const QVariant &orig, const Engine &engine) |
Helper type to select the correct overload from several variants. More... | |
typedef std::function < QVariant(const QVariant &op, Engine &engine)> | UnaryOperatorCall |
pointer to a function wrapping an unary operator More... | |
typedef QVariant(* | UnaryOperatorCall_FP )(const QVariant &op, Engine &engine) |
Helper type to select the correct overload from several variants. More... | |
Functions | |
ELAM_EXPORT QString | versionInfo () |
returns version information about ELAM More... | |
ELAM_EXPORT QDebug & | operator<< (QDebug, const Token &) |
makes tokens accessable to qDebug() More... | |
ELAM_EXPORT QDebug & | operator<< (QDebug, const QList< Token > &) |
makes tokens accessable to qDebug() More... | |
ELAM_EXPORT QDebug & | operator<< (QDebug, const Expression &) |
makes expressions accessable to qDebug() More... | |
ELAM_EXPORT QDebug & | operator<< (QDebug, const Position &) |
ELAM_EXPORT QDebug & | operator<< (QDebug, const Exception &) |
QDebug & | operator<< (QDebug, const AnyType &) |
typedef std::function<QVariant(const QVariant&op1,const QVariant&op2,Engine&engine)> ELAM::BinaryOperatorCall |
pointer to a function wrapping a binary operator
op1 | the left operand |
op2 | the right operand |
engine | the engine calling the operator |
typedef QVariant(* ELAM::BinaryOperatorCall_FP)(const QVariant &op1, const QVariant &op2, Engine &engine) |
Helper type to select the correct overload from several variants.
If your compiler complains that it cannot resolve an overloaded pointer when calling BinaryOperator::setCallback then cast to this type to help the compiler:
typedef std::function<QVariant(const QList<QVariant>&args,Engine&engine)> ELAM::Function |
pointer to a function wrapping a mathematical function
args | the list of arguments |
Functions must check their arguments for validity before they start calculating. On error a function should returns an ELAM::Exception.
args | the list of arguments that was given to the function, the implementation must check for length and type of the arguments |
engine | the engine calling the function |
typedef QVariant(* ELAM::Function_FP)(const QList< QVariant > &args, Engine &engine) |
Helper type to select the correct overload from several variants.
If your compiler complains that it cannot resolve an overloaded pointer when calling Engine::setFunction then cast to this type to help the compiler:
typedef std::function<QPair<QString,QVariant>const QString&expr,Engine&engine,int start)> ELAM::LiteralParser |
wraps the parser routine for a literal
expr | the original expression string |
engine | the engine that is calling this parser |
start | the character (index of expr) at which the literal starts |
The string representation of the literal must be verbatim from expr, so that the calling engine can determine where to continue parsing in expr.
If the parser does not find a valid literal according to its rules it must return an empty string.
typedef QPair<QString,QVariant>(* ELAM::LiteralParser_FP)(const QString &expr, Engine &engine, int start) |
Helper type to select the correct overload from several variants.
If your compiler complains that it cannot resolve an overloaded pointer when calling Engine::setLiteralParser then cast to this type to help the compiler:
typedef std::function<QVariant(const QVariant&orig,const Engine&engine)> ELAM::TypeCast |
Wraps a cast function to convert various types into another type.
orig | the original value of any type |
engine | the engine calling the cast |
typedef QVariant(* ELAM::TypeCast_FP)(const QVariant &orig, const Engine &engine) |
Helper type to select the correct overload from several variants.
If your compiler complains that it cannot resolve an overloaded pointer when calling Engine::setAutoCast then cast to this type to help the compiler:
typedef std::function<QVariant(const QVariant&op,Engine&engine)> ELAM::UnaryOperatorCall |
pointer to a function wrapping an unary operator
op | the operand to be worked on |
engine | the engine calling the operator |
typedef QVariant(* ELAM::UnaryOperatorCall_FP)(const QVariant &op, Engine &engine) |
Helper type to select the correct overload from several variants.
If your compiler complains that it cannot resolve an overloaded pointer when calling UnaryOperator::setCallback then cast to this type to help the compiler:
ELAM_EXPORT QDebug& ELAM::operator<< | ( | QDebug | , |
const Position & | |||
) |
ELAM_EXPORT QDebug& ELAM::operator<< | ( | QDebug | , |
const Token & | |||
) |
makes tokens accessable to qDebug()
ELAM_EXPORT QDebug& ELAM::operator<< | ( | QDebug | , |
const QList< Token > & | |||
) |
makes tokens accessable to qDebug()
ELAM_EXPORT QDebug& ELAM::operator<< | ( | QDebug | , |
const Exception & | |||
) |
QDebug& ELAM::operator<< | ( | QDebug | , |
const AnyType & | |||
) |
ELAM_EXPORT QDebug& ELAM::operator<< | ( | QDebug | , |
const Expression & | |||
) |
makes expressions accessable to qDebug()
ELAM_EXPORT QString ELAM::versionInfo | ( | ) |
returns version information about ELAM