Encapsulation of prototypes for a numerical parser function. More...
#include <qmuparsercallback.h>
Public Member Functions | |
QmuParserCallback (fun_type0 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (fun_type1 a_pFun, bool a_bAllowOpti, int a_iPrec=-1, ECmdCode a_iCode=cmFUNC) | |
QmuParserCallback (fun_type2 a_pFun, bool a_bAllowOpti, int a_iPrec, EOprtAssociativity a_eOprtAsct) | |
Constructor for constructing binary operator callbacks. More... | |
QmuParserCallback (fun_type2 a_pFun, bool a_bAllowOpti) | |
Constructor for constructing funcstion callbacks taking two arguments. More... | |
QmuParserCallback (fun_type3 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (fun_type4 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (fun_type5 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (fun_type6 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (fun_type7 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (fun_type8 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (fun_type9 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (fun_type10 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (bulkfun_type0 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (bulkfun_type1 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (bulkfun_type2 a_pFun, bool a_bAllowOpti) | |
Constructor for constructing funcstion callbacks taking two arguments. More... | |
QmuParserCallback (bulkfun_type3 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (bulkfun_type4 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (bulkfun_type5 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (bulkfun_type6 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (bulkfun_type7 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (bulkfun_type8 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (bulkfun_type9 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (bulkfun_type10 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (multfun_type a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (strfun_type1 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (strfun_type2 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback (strfun_type3 a_pFun, bool a_bAllowOpti) | |
QmuParserCallback () | |
Default constructor. More... | |
QmuParserCallback (const QmuParserCallback &a_Fun) | |
Copy constructor. More... | |
QmuParserCallback & | operator= (const QmuParserCallback &a_Fun) |
Q_REQUIRED_RESULT QmuParserCallback * | Clone () const |
Clone this instance and return a pointer to the new instance. More... | |
bool | IsOptimizable () const |
Return true 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. More... | |
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. More... | |
Private Attributes | |
void * | m_pFun |
Pointer to the callback function, casted to void. More... | |
int | m_iArgc |
Number of numeric function arguments. More... | |
int | m_iPri |
Valid only for binary and infix operators; Operator precedence. More... | |
EOprtAssociativity | m_eOprtAsct |
Operator associativity; Valid only for binary operators. More... | |
ECmdCode | m_iCode |
ETypeCode | m_iType |
bool | m_bAllowOpti |
Flag indication optimizeability. 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 49 of file qmuparsercallback.h.
qmu::QmuParserCallback::QmuParserCallback | ( | fun_type0 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 36 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | fun_type1 | a_pFun, |
bool | a_bAllowOpti, | ||
int | a_iPrec = -1 , |
||
ECmdCode | a_iCode = cmFUNC |
||
) |
Definition at line 45 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | 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 funcation can be optimized |
a_iPrec | The operator precedence |
a_eOprtAsct | The operators associativity |
nothrow |
Definition at line 75 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | fun_type2 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Constructor for constructing funcstion callbacks taking two arguments.
nothrow |
Definition at line 58 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | fun_type3 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 84 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | fun_type4 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 94 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | fun_type5 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 104 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | fun_type6 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 113 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | fun_type7 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 122 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | fun_type8 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 131 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | fun_type9 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 140 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | fun_type10 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 149 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | bulkfun_type0 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 158 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | bulkfun_type1 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 167 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | bulkfun_type2 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Constructor for constructing funcstion callbacks taking two arguments.
nothrow |
Definition at line 180 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | bulkfun_type3 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 189 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | bulkfun_type4 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 198 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | bulkfun_type5 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 207 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | bulkfun_type6 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 216 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | bulkfun_type7 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 225 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | bulkfun_type8 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 234 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | bulkfun_type9 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 243 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | bulkfun_type10 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 252 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | multfun_type | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 261 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | strfun_type1 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 270 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | strfun_type2 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 279 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | strfun_type3 | a_pFun, |
bool | a_bAllowOpti | ||
) |
Definition at line 288 of file qmuparsercallback.cpp.
qmu::QmuParserCallback::QmuParserCallback | ( | ) |
Default constructor.
nothrow |
Definition at line 298 of file qmuparsercallback.cpp.
Referenced by Clone().
qmu::QmuParserCallback::QmuParserCallback | ( | const QmuParserCallback & | a_Fun | ) |
|
inline |
Clone this instance and return a pointer to the new instance.
Definition at line 121 of file qmuparsercallback.h.
References QmuParserCallback().
|
inline |
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 148 of file qmuparsercallback.h.
References m_pFun.
Referenced by qmu::QmuParserBase::AddCallback(), and qmu::QmuParserToken< TBase, TString >::Set().
|
inline |
Returns the number of function Arguments.
Definition at line 196 of file qmuparsercallback.h.
References m_iArgc.
|
inline |
Return the operators associativity.
nothrown | Only valid if the callback token is a binary operator token. |
Definition at line 187 of file qmuparsercallback.h.
References m_eOprtAsct.
|
inline |
Return the callback code.
Definition at line 157 of file qmuparsercallback.h.
References m_iCode.
Referenced by qmu::QmuParserBase::CheckOprt(), and qmu::QmuParserToken< TBase, TString >::Set().
|
inline |
Return the operator precedence.
nothrown | Only valid if the callback token is an operator token (binary or infix). |
Definition at line 175 of file qmuparsercallback.h.
References m_iPri.
|
inline |
Definition at line 163 of file qmuparsercallback.h.
References m_iType.
|
inline |
Return true if the function is conservative.
Conservative functions return always the same result for the same argument.
nothrow |
Definition at line 134 of file qmuparsercallback.h.
References m_bAllowOpti.
QmuParserCallback & qmu::QmuParserCallback::operator= | ( | const QmuParserCallback & | a_Fun | ) |
Definition at line 314 of file qmuparsercallback.cpp.
References m_bAllowOpti, m_eOprtAsct, m_iArgc, m_iCode, m_iPri, m_iType, and m_pFun.
|
private |
Flag indication optimizeability.
Definition at line 108 of file qmuparsercallback.h.
Referenced by IsOptimizable(), and operator=().
|
private |
Operator associativity; Valid only for binary operators.
Definition at line 105 of file qmuparsercallback.h.
Referenced by GetAssociativity(), and operator=().
|
private |
Number of numeric function arguments.
This number is negative for functions with variable number of arguments. in this cases they represent the actual number of arguments found.
Definition at line 103 of file qmuparsercallback.h.
Referenced by GetArgc(), and operator=().
|
private |
Definition at line 106 of file qmuparsercallback.h.
Referenced by GetCode(), and operator=().
|
private |
Valid only for binary and infix operators; Operator precedence.
Definition at line 104 of file qmuparsercallback.h.
Referenced by GetPri(), and operator=().
|
private |
Definition at line 107 of file qmuparsercallback.h.
Referenced by GetType(), and operator=().
|
private |
Pointer to the callback function, casted to void.
Definition at line 95 of file qmuparsercallback.h.
Referenced by GetAddr(), and operator=().