![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cExpressionExec.h>
Public Member Functions | |
| cExpressionExec (cExpressionContext *pContext) | |
| virtual | ~cExpressionExec () |
| virtual HRESULT | ExecuteFunctionInt (const ATOMCHAR_t *&rpszExp, OUT cVariant &vValRet, EXP_PARSE_MASK_t uParseFlags) |
| Parse and exec a function returning a variant. More... | |
| HRESULT | ExecuteCommand (const ATOMCHAR_t *pszCommand, OUT cVariant &vValRet) |
| Execute a single command line. as typed by some user. More... | |
| HRESULT | GetVarRef1 (const ATOMCHAR_t *&rpszExp, OUT cVariant &vValRet) |
| HRESULT | DoMathOp1 (cVariant &vVal, const ATOMCHAR_t *&rpszExp) |
| virtual HRESULT | GetVarRef2 (const ATOMCHAR_t *&rpszExp, OUT cVariant &vValRet, bool bInArray) override |
| cVariant | GetVarComplexRef (const ATOMCHAR_t *&rpszExp) |
| cVariant | GetVarComplex (const ATOMCHAR_t *pszExp) |
| bool | GetComplexBool (const ATOMCHAR_t *pszExp) |
| int | GetComplexInt (const ATOMCHAR_t *pszExp) |
| UINT32 | GetComplexDWord (const ATOMCHAR_t *pszExp) |
| float | GetComplexFloat (const ATOMCHAR_t *pszExp) |
| double | GetComplexDouble (const ATOMCHAR_t *pszExp) |
Public Member Functions inherited from GrayLib::cExpressionBase | |
| IGNORE_WARN_ABSTRACT (cExpressionBase) | |
| HRESULT | GetArrayListRef (const ATOMCHAR_t *&rpszExp, OUT cVariant &vValRet, ITERATE_t nAppendStart=0) |
| HRESULT | GetArrayRef (const ATOMCHAR_t *&rpszExp, OUT cVariant &vValRet, ITERATE_t nAppendStart=0) |
| HRESULT | GetMapListRef (const ATOMCHAR_t *&rpszExp, OUT cVarMap &rMapRet) |
| HRESULT | GetMapRef (const ATOMCHAR_t *&rpszExp, OUT cVarMap &rMapRet) |
| HRESULT | GetMapListRef (const ATOMCHAR_t *&rpszExp, OUT cVariant &rMapRet) |
| HRESULT | GetMapRef (const ATOMCHAR_t *&rpszExp, OUT cVariant &vValRet) |
| cVariant | GetVarRef (const ATOMCHAR_t *&rpszExp) |
| HRESULT | GetVar (const ATOMCHAR_t *pszExp, OUT cVariant &vValRet) |
| cVariant | GetVar (const ATOMCHAR_t *pszExp) |
| UNITTEST_FRIEND (cExpressionBase) | |
Static Public Member Functions | |
| static HRESULT GRAYCALL | DoMathOp2 (cVariant &vVal, const cVariant &vVal2, ATOMCHAR_t chOp) |
| static int | GetXInt (const ATOMCHAR_t *pszExp) |
| static UINT32 | GetXDWord (const ATOMCHAR_t *pszExp) |
| static float | GetXFloat (const ATOMCHAR_t *pszExp) |
Static Public Member Functions inherited from GrayLib::cExpressionBase | |
| static bool GRAYCALL | IsParenNeeded (const ATOMCHAR_t *pszExp) |
| static HRESULT GRAYCALL | GetStringRefQ (const ATOMCHAR_t *&rpszExp, OUT cStringA &rsRet) |
| static HRESULT GRAYCALL | GetStringRefV (const ATOMCHAR_t *&rpszExp, OUT cVariant &rvValRet) |
| static HRESULT GRAYCALL | GetMapElementName (const ATOMCHAR_t *&rpszExp, OUT cStringA &rsName) |
| static HRESULT GRAYCALL | GetSimpleVarRef (const ATOMCHAR_t *&rpszExp, OUT cVariant &vValRet) |
Static Public Attributes | |
| static cExpressionExec * | sm_pExpExecBest |
| allow cScriptExec (or other engine) to be used as default. More... | |
Static Public Attributes inherited from GrayLib::cExpressionBase | |
| static const ATOMCHAR_t | k_ArrayOpen = '[' |
| static const ATOMCHAR_t | k_ArrayClose = ']' |
| static const ATOMCHAR_t | k_MapOpen = '{' |
| static const ATOMCHAR_t | k_MapClose = '}' |
Protected Member Functions | |
| HRESULT | ParseArgV (const ATOMCHAR_t *&rpszExp, OUT cVariant &vArgsRet, EXP_PARSE_MASK_t uParseFlags) |
| cExpressionContext * | get_ContextCurrent () const |
Protected Attributes | |
| EXP_PARSE_MASK_t | m_wParseFlags |
| EXP_PARSE_IGNORE_EXTRA. More... | |
Evaluate a string as an expression (possibly complex math etc). Store result as a cVariant. Stack based instantiation used to set the current cExpressionContext for this thread.
|
explicit |
|
virtual |
| HRESULT GrayLib::cExpressionExec::DoMathOp1 | ( | cVariant & | vVal, |
| const ATOMCHAR_t *& | rpszExp | ||
| ) |
|
static |
Complex = could be an expression. Complex = can be 1+2 without (1+2) parenthesis
| HRESULT GrayLib::cExpressionExec::ExecuteCommand | ( | const ATOMCHAR_t * | pszCommand, |
| OUT cVariant & | vValRet | ||
| ) |
Execute a single command line. as typed by some user.
|
virtual |
Parse and exec a function returning a variant.
Reimplemented in GrayLib::cScriptExec.
|
inlineprotected |
Get the context attached to this exec engine. should most times be the same as current!
< a hard assigned context ?
< else just use the current (for thread) or default context.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
This version doesn't advance the pszExp pointer.
| cVariant GrayLib::cExpressionExec::GetVarComplexRef | ( | const ATOMCHAR_t *& | rpszExp | ) |
| HRESULT GrayLib::cExpressionExec::GetVarRef1 | ( | const ATOMCHAR_t *& | rpszExp, |
| OUT cVariant & | vValRet | ||
| ) |
|
overridevirtual |
Reimplemented from GrayLib::cExpressionBase.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
protected |
|
protected |
EXP_PARSE_IGNORE_EXTRA.
|
static |
allow cScriptExec (or other engine) to be used as default.