NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
Encapsulation of prototypes for a numerical parser function. More...
#include <muParserCallback.h>
Public Member Functions | |
ParserCallback (fun_type0 a_pFun, bool optimizeAway) | |
ParserCallback (fun_type1 a_pFun, bool optimizeAway, int a_iPrec=-1, ECmdCode a_iCode=cmFUNC) | |
ParserCallback (fun_type2 a_pFun, bool optimizeAway, int a_iPrec, EOprtAssociativity a_eAssociativity) | |
Constructor for constructing binary operator callbacks. More... | |
ParserCallback (fun_type2 a_pFun, bool optimizeAway) | |
Constructor for constructing funcstion callbacks taking two arguments. More... | |
ParserCallback (fun_type3 a_pFun, bool optimizeAway) | |
ParserCallback (fun_type4 a_pFun, bool optimizeAway) | |
ParserCallback (fun_type5 a_pFun, bool optimizeAway) | |
ParserCallback (fun_type6 a_pFun, bool optimizeAway) | |
ParserCallback (fun_type7 a_pFun, bool optimizeAway) | |
ParserCallback (fun_type8 a_pFun, bool optimizeAway) | |
ParserCallback (fun_type9 a_pFun, bool optimizeAway) | |
ParserCallback (fun_type10 a_pFun, bool optimizeAway) | |
ParserCallback (bulkfun_type0 a_pFun, bool optimizeAway) | |
ParserCallback (bulkfun_type1 a_pFun, bool optimizeAway) | |
ParserCallback (bulkfun_type2 a_pFun, bool optimizeAway) | |
Constructor for constructing funcstion callbacks taking two arguments. More... | |
ParserCallback (bulkfun_type3 a_pFun, bool optimizeAway) | |
ParserCallback (bulkfun_type4 a_pFun, bool optimizeAway) | |
ParserCallback (bulkfun_type5 a_pFun, bool optimizeAway) | |
ParserCallback (bulkfun_type6 a_pFun, bool optimizeAway) | |
ParserCallback (bulkfun_type7 a_pFun, bool optimizeAway) | |
ParserCallback (bulkfun_type8 a_pFun, bool optimizeAway) | |
ParserCallback (bulkfun_type9 a_pFun, bool optimizeAway) | |
ParserCallback (bulkfun_type10 a_pFun, bool optimizeAway) | |
ParserCallback (multfun_type a_pFun, bool optimizeAway) | |
ParserCallback (strfun_type1 a_pFun, bool optimizeAway) | |
ParserCallback (strfun_type2 a_pFun, bool optimizeAway) | |
ParserCallback (strfun_type3 a_pFun, bool optimizeAway) | |
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. More... | |
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. 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 50 of file muParserCallback.h.
mu::ParserCallback::ParserCallback | ( | fun_type0 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 36 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | fun_type1 | a_pFun, |
bool | optimizeAway, | ||
int | a_iPrec = -1 , |
||
ECmdCode | a_iCode = cmFUNC |
||
) |
Definition at line 47 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | fun_type2 | a_pFun, |
bool | optimizeAway, | ||
int | a_iPrec, | ||
EOprtAssociativity | a_eOprtAsct | ||
) |
Constructor for constructing binary operator callbacks.
a_pFun | Pointer to a static function taking two arguments |
optimizeAway | A flag indicating this funcation 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 | optimizeAway | ||
) |
Constructor for constructing funcstion callbacks taking two arguments.
nothrow |
Definition at line 62 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | fun_type3 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 94 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | fun_type4 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 106 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | fun_type5 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 118 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | fun_type6 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 129 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | fun_type7 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 140 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | fun_type8 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 151 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | fun_type9 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 162 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | fun_type10 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 173 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | bulkfun_type0 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 184 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | bulkfun_type1 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 195 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | bulkfun_type2 | a_pFun, |
bool | optimizeAway | ||
) |
Constructor for constructing funcstion callbacks taking two arguments.
nothrow |
Definition at line 210 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | bulkfun_type3 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 221 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | bulkfun_type4 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 233 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | bulkfun_type5 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 245 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | bulkfun_type6 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 256 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | bulkfun_type7 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 267 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | bulkfun_type8 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 278 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | bulkfun_type9 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 289 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | bulkfun_type10 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 300 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | multfun_type | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 312 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | strfun_type1 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 324 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | strfun_type2 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 336 of file muParserCallback.cpp.
mu::ParserCallback::ParserCallback | ( | strfun_type3 | a_pFun, |
bool | optimizeAway | ||
) |
Definition at line 348 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 | ) |
Copy constructor.
nothrow |
Definition at line 378 of file muParserCallback.cpp.
References m_bAllowOpti, m_eOprtAsct, m_iArgc, m_iCode, m_iPri, m_iType, and m_pFun.
ParserCallback * mu::ParserCallback::Clone | ( | ) | const |
Clone this instance and return a pointer to the new instance.
Definition at line 391 of file muParserCallback.cpp.
References ParserCallback().
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.
References m_pFun.
Referenced by mu::ParserBase::AddCallback(), mu::ParserBase::evaluateTemporaryVectors(), and mu::ParserToken< TBase, TString >::Set().
int mu::ParserCallback::GetArgc | ( | ) | const |
Returns the number of function Arguments.
Definition at line 459 of file muParserCallback.cpp.
References m_iArgc.
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.
References m_eOprtAsct.
ECmdCode mu::ParserCallback::GetCode | ( | ) | const |
Return the callback code.
Definition at line 423 of file muParserCallback.cpp.
References m_iCode.
Referenced by mu::ParserBase::CheckOprt(), and mu::ParserToken< TBase, TString >::Set().
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.
References m_iPri.
ETypeCode mu::ParserCallback::GetType | ( | ) | const |
Definition at line 429 of file muParserCallback.cpp.
References m_iType.
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.
References m_bAllowOpti.
|
private |
Flag indication optimizeability.
Definition at line 108 of file muParserCallback.h.
Referenced by IsOptimizable(), and ParserCallback().
|
private |
Operator associativity; Valid only for binary operators.
Definition at line 105 of file muParserCallback.h.
Referenced by GetAssociativity(), and ParserCallback().
|
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 muParserCallback.h.
Referenced by GetArgc(), and ParserCallback().
|
private |
Definition at line 106 of file muParserCallback.h.
Referenced by GetCode(), and ParserCallback().
|
private |
Valid only for binary and infix operators; Operator precedence.
Definition at line 104 of file muParserCallback.h.
Referenced by GetPri(), and ParserCallback().
|
private |
Definition at line 107 of file muParserCallback.h.
Referenced by GetType(), and ParserCallback().
|
private |
Pointer to the callback function, casted to void.
Definition at line 96 of file muParserCallback.h.
Referenced by GetAddr(), and ParserCallback().