muParser API -
1.35
|
Encapsulation of prototypes for a numerical parser function. More...
#include <muParserCallback.h>
Public Member Functions | |
ParserCallback (fun_type0 a_pFun, bool a_bAllowOpti) | |
ParserCallback (fun_type1 a_pFun, bool a_bAllowOpti, int a_iPrec=-1, ECmdCode a_iCode=cmFUNC) | |
ParserCallback (fun_type2 a_pFun, bool a_bAllowOpti, int a_iPrec, EOprtAssociativity a_eAssociativity) | |
Constructor for constructing binary operator callbacks. More... | |
ParserCallback (fun_type2 a_pFun, bool a_bAllowOpti) | |
Constructor for constructing function callbacks taking two arguments. More... | |
ParserCallback (fun_type3 a_pFun, bool a_bAllowOpti) | |
ParserCallback (fun_type4 a_pFun, bool a_bAllowOpti) | |
ParserCallback (fun_type5 a_pFun, bool a_bAllowOpti) | |
ParserCallback (fun_type6 a_pFun, bool a_bAllowOpti) | |
ParserCallback (fun_type7 a_pFun, bool a_bAllowOpti) | |
ParserCallback (fun_type8 a_pFun, bool a_bAllowOpti) | |
ParserCallback (fun_type9 a_pFun, bool a_bAllowOpti) | |
ParserCallback (fun_type10 a_pFun, bool a_bAllowOpti) | |
ParserCallback (bulkfun_type0 a_pFun, bool a_bAllowOpti) | |
ParserCallback (bulkfun_type1 a_pFun, bool a_bAllowOpti) | |
ParserCallback (bulkfun_type2 a_pFun, bool a_bAllowOpti) | |
Constructor for constructing function callbacks taking two arguments. More... | |
ParserCallback (bulkfun_type3 a_pFun, bool a_bAllowOpti) | |
ParserCallback (bulkfun_type4 a_pFun, bool a_bAllowOpti) | |
ParserCallback (bulkfun_type5 a_pFun, bool a_bAllowOpti) | |
ParserCallback (bulkfun_type6 a_pFun, bool a_bAllowOpti) | |
ParserCallback (bulkfun_type7 a_pFun, bool a_bAllowOpti) | |
ParserCallback (bulkfun_type8 a_pFun, bool a_bAllowOpti) | |
ParserCallback (bulkfun_type9 a_pFun, bool a_bAllowOpti) | |
ParserCallback (bulkfun_type10 a_pFun, bool a_bAllowOpti) | |
ParserCallback (multfun_type a_pFun, bool a_bAllowOpti) | |
ParserCallback (strfun_type1 a_pFun, bool a_bAllowOpti) | |
ParserCallback (strfun_type2 a_pFun, bool a_bAllowOpti) | |
ParserCallback (strfun_type3 a_pFun, bool a_bAllowOpti) | |
ParserCallback () | |
Default constructor. More... | |
ParserCallback (const ParserCallback &a_Fun) | |
Copy constructor. More... | |
ParserCallback * | Clone () const |
Clone this instance and return a pointer to the new instance. | |
bool | IsOptimizable () const |
Return tru if the function is conservative. More... | |
void * | GetAddr () const |
Get the callback address for the parser function. More... | |
ECmdCode | GetCode () const |
Return the callback code. | |
ETypeCode | GetType () const |
int | GetPri () const |
Return the operator precedence. More... | |
EOprtAssociativity | GetAssociativity () const |
Return the operators associativity. More... | |
int | GetArgc () const |
Returns the number of function Arguments. | |
Encapsulation of prototypes for a numerical parser function.
Encapsulates the prototyp for numerical parser functions. The class stores the number of arguments for parser functions as well as additional flags indication the function is non optimizeable. The pointer to the callback function pointer is stored as void* and needs to be casted according to the argument count. Negative argument counts indicate a parser function with a variable number of arguments.
Definition at line 50 of file muParserCallback.h.
mu::ParserCallback::ParserCallback | ( | fun_type2 | a_pFun, |
bool | a_bAllowOpti, | ||
int | a_iPrec, | ||
EOprtAssociativity | a_eOprtAsct | ||
) |
Constructor for constructing binary operator callbacks.
a_pFun | Pointer to a static function taking two arguments |
a_bAllowOpti | A flag indicating this function can be optimized |
a_iPrec | The operator precedence |
a_eOprtAsct | The operators associativity |
nothrow |
Definition at line 80 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | fun_type2 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Constructor for constructing function callbacks taking two arguments.
nothrow |
Definition at line 62 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | bulkfun_type2 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Constructor for constructing function callbacks taking two arguments.
nothrow |
Definition at line 210 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | ) |
Default constructor.
nothrow |
Definition at line 363 of file muParserCallback.cpp.
Referenced by Clone().
mu::ParserCallback::ParserCallback | ( | const ParserCallback & | ref | ) |
void * mu::ParserCallback::GetAddr | ( | ) | const |
Get the callback address for the parser function.
The type of the address is void. It needs to be recasted according to the argument number to the right type.
nothrow |
Definition at line 416 of file muParserCallback.cpp.
Referenced by mu::ParserToken< value_type, string_type >::Set().
EOprtAssociativity mu::ParserCallback::GetAssociativity | ( | ) | const |
Return the operators associativity.
nothrown | Only valid if the callback token is a binary operator token. |
Definition at line 452 of file muParserCallback.cpp.
int mu::ParserCallback::GetPri | ( | ) | const |
Return the operator precedence.
nothrown | Only valid if the callback token is an operator token (binary or infix). |
Definition at line 441 of file muParserCallback.cpp.
bool mu::ParserCallback::IsOptimizable | ( | ) | const |
Return tru if the function is conservative.
Conservative functions return always the same result for the same argument.
nothrow |
Definition at line 402 of file muParserCallback.cpp.