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, ECmdCode a_iCode) | |
ParserCallback (fun_type1 a_pFun, bool a_bAllowOpti) | |
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 (strfun_type4 a_pFun, bool a_bAllowOpti) | |
ParserCallback (strfun_type5 a_pFun, bool a_bAllowOpti) | |
ParserCallback (strfun_type6 a_pFun, bool a_bAllowOpti) | |
ParserCallback (fun_userdata_type0 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (fun_userdata_type1 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (fun_userdata_type2 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (fun_userdata_type3 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (fun_userdata_type4 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (fun_userdata_type5 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (fun_userdata_type6 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (fun_userdata_type7 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (fun_userdata_type8 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (fun_userdata_type9 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (fun_userdata_type10 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (bulkfun_userdata_type0 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (bulkfun_userdata_type1 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (bulkfun_userdata_type2 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (bulkfun_userdata_type3 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (bulkfun_userdata_type4 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (bulkfun_userdata_type5 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (bulkfun_userdata_type6 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (bulkfun_userdata_type7 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (bulkfun_userdata_type8 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (bulkfun_userdata_type9 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (bulkfun_userdata_type10 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (multfun_userdata_type a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (strfun_userdata_type1 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (strfun_userdata_type2 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (strfun_userdata_type3 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (strfun_userdata_type4 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (strfun_userdata_type5 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback (strfun_userdata_type6 a_pFun, void *a_pUserData, bool a_bAllowOpti) | |
ParserCallback () | |
Default constructor. More... | |
ParserCallback (const ParserCallback &a_Fun) | |
Copy constructor. More... | |
ParserCallback & | operator= (const ParserCallback &a_Fun) |
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... | |
bool | IsValid () const |
Check that the callback looks valid. More... | |
void * | GetAddr () const |
Get the callback address for the parser function. More... | |
void * | GetUserData () const |
Get the user data if present, else nullptr. 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 numeric function Arguments. More... | |
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 52 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 102 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 84 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 350 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | ) |
Default constructor.
nothrow |
Definition at line 725 of file muParserCallback.cpp.
Referenced by Clone().
mu::ParserCallback::ParserCallback | ( | const ParserCallback & | ref | ) |
Copy constructor.
nothrow |
Definition at line 739 of file muParserCallback.cpp.
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 811 of file muParserCallback.cpp.
Referenced by IsValid().
int mu::ParserCallback::GetArgc | ( | ) | const |
Returns the number of numeric function Arguments.
This number is negative for functions with variable number of arguments.
Definition at line 886 of file muParserCallback.cpp.
EOprtAssociativity mu::ParserCallback::GetAssociativity | ( | ) | const |
Return the operators associativity.
nothrown | Only valid if the callback token is a binary operator token. |
Definition at line 876 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 865 of file muParserCallback.cpp.
void * mu::ParserCallback::GetUserData | ( | ) | const |
Get the user data if present, else nullptr.
nothrow |
Definition at line 824 of file muParserCallback.cpp.
Referenced by IsValid().
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 798 of file muParserCallback.cpp.
bool mu::ParserCallback::IsValid | ( | ) | const |
Check that the callback looks valid.
nothrow | Check that the function pointer is not null, and if there are user data that they are not null. |
Definition at line 839 of file muParserCallback.cpp.
Referenced by mu::ParserToken< value_type, string_type >::Set().