6 #ifndef _INC_cExpressionExec_H
7 #define _INC_cExpressionExec_H
16 #include "../Variant/cVariant.h"
64 if (m_pExpContext !=
nullptr)
94 return GetVarComplexRef(pszExp);
98 #define EXP_GET_TYPE(a,b) a GetComplex##b( const ATOMCHAR_t* pszExp ) { return GetVarComplexRef( pszExp ).get_##b(); }
107 #define EXP_GET_X_TYPE(a,b) static inline a GetX##b( const ATOMCHAR_t* pszExp ) { return sm_pExpExecBest->GetVarComplexRef( pszExp ).get_##b(); }
111 #undef EXP_GET_X_TYPE
#define GRAYCALL
declare calling convention for static functions so everyone knows the arg passing scheme....
Definition: GrayCore.h:36
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
#define EXP_GET_X_TYPE(a, b)
Define static version that doesn't advance the pointer.
Definition: cExpressionExec.h:107
#define EXP_GET_TYPE(a, b)
Define version that doesn't advance the pointer.
Definition: cExpressionExec.h:98
Definition: cExpressionBase.h:27
static cExpressionContext *GRAYCALL GetContextCurrent()
Definition: cExpressionContext.cpp:292
Definition: cExpressionContext.h:18
Definition: cExpressionExec.h:37
static cExpressionExec * sm_pExpExecBest
allow cScriptExec (or other engine) to be used as default.
Definition: cExpressionExec.h:46
cVariant GetVarComplexRef(const ATOMCHAR_t *&rpszExp)
virtual ~cExpressionExec()
static HRESULT GRAYCALL DoMathOp2(cVariant &vVal, const cVariant &vVal2, ATOMCHAR_t chOp)
HRESULT ParseArgV(const ATOMCHAR_t *&rpszExp, OUT cVariant &vArgsRet, EXP_PARSE_MASK_t uParseFlags)
EXP_PARSE_MASK_t m_wParseFlags
EXP_PARSE_IGNORE_EXTRA.
Definition: cExpressionExec.h:49
virtual HRESULT ExecuteFunctionInt(const ATOMCHAR_t *&rpszExp, OUT cVariant &vValRet, EXP_PARSE_MASK_t uParseFlags)
Parse and exec a function returning a variant.
cExpressionContext * get_ContextCurrent() const
Definition: cExpressionExec.h:61
HRESULT GetVarRef1(const ATOMCHAR_t *&rpszExp, OUT cVariant &vValRet)
cVariant GetVarComplex(const ATOMCHAR_t *pszExp)
Definition: cExpressionExec.h:91
cExpressionExec(cExpressionContext *pContext)
virtual HRESULT GetVarRef2(const ATOMCHAR_t *&rpszExp, OUT cVariant &vValRet, bool bInArray) override
HRESULT DoMathOp1(cVariant &vVal, const ATOMCHAR_t *&rpszExp)
HRESULT ExecuteCommand(const ATOMCHAR_t *pszCommand, OUT cVariant &vValRet)
Execute a single command line. as typed by some user.
Definition: cVariant.h:26
EXP_PARSE_TYPE_
Definition: cExpressionExec.h:21
@ EXP_PARSE_FUNC
Allow syntax like "FUNCTION(ARGS)".
Definition: cExpressionExec.h:27
@ EXP_PARSE_IGNORE_EXTRA
ignore/allow extra junk at the end of expression we don't parse and don't call an error.
Definition: cExpressionExec.h:30
@ EXP_PARSE_SLOP
Allow sloppy syntax with just a space. "PROP ARGS".
Definition: cExpressionExec.h:28
@ EXP_PARSE_STR1
Assume arguments are just a single string. quotes not required.
Definition: cExpressionExec.h:25
@ EXP_PARSE_PROP
Allow syntax like "PROP=ARGS".
Definition: cExpressionExec.h:26
@ EXP_PARSE_0
defaults.
Definition: cExpressionExec.h:24
@ EXP_PARSE_GLOBALS
Use Globals.
Definition: cExpressionExec.h:31
WORD EXP_PARSE_MASK_t
EXP_PARSE_TYPE_ Flags.
Definition: cExpressionExec.h:34
char ATOMCHAR_t
the char form (UNICODE or not) for an atom. (for symbolic names)
Definition: StrConst.h:15