1 #ifndef __EIENEXPR_HPP__ 2 #define __EIENEXPR_HPP__ 9 #ifdef EIENEXPR_DLL_USE 10 #if defined(_MSC_VER) || defined(WIN32) 11 #pragma warning( disable: 4251 ) 12 #ifdef EIENEXPR_DLL_EXPORTS 13 #define EIENEXPR_DLL __declspec(dllexport) 15 #define EIENEXPR_DLL __declspec(dllimport) 18 #define EIENEXPR_API __stdcall 28 #define EIENEXPR_FUNC_DECL(ret) EIENEXPR_DLL ret EIENEXPR_API 29 #define EIENEXPR_FUNC_IMPL(ret) ret EIENEXPR_API 66 virtual ExprAtom * clone()
const = 0;
88 ExprOperator(
winux::String const & oprStr =
"",
bool isUnary =
false,
bool isRight =
false,
short level = 0, OperatorFunction oprFn = NULL );
117 static void AddOpr(
winux::String const & oprStr,
bool isUnary,
bool isRight,
short level, OperatorFunction oprFn );
119 static bool DelOpr(
winux::String const & oprStr,
bool isUnary,
bool isRight );
121 static bool ModifyOpr(
int i,
winux::String const & oprStr,
bool isUnary,
bool isRight,
short level, OperatorFunction oprFn );
181 static bool NumberPossibility(
winux::String const & str,
bool * isFloat = NULL,
bool * isExp = NULL );
267 static void SetFunc(
winux::String const & funcName, FuncFunction fn );
273 static bool FindFunc(
winux::String const & funcName, FuncFunction * fn );
276 static int GetAllFuncs( std::vector< std::pair< winux::String, FuncFunction > > * funcs );
296 bool isEmpty()
const {
return this->_suffixAtoms.empty(); }
300 void * getDataPtr()
const;
357 std::map< winux::String, VariableStruct >
_vars;
376 enum ExprParseContext
378 epcExpr, epcFuncParams, epcString, epcStrAntiSlashes
389 #endif //__EIENEXPR_HPP__
ExprError(int errNo, winux::AnsiString const &err)
winux::String _funcName
函数名
ExprOperandType _operandType
std::basic_string< char > AnsiString
std::map< winux::String, FuncFunction > StringFuncMap
std::vector< Expression * > _params
参数,也是表达式
static std::vector< ExprOperator > _Operators
std::map< winux::String, VariableStruct > _vars
static StringFuncMap _FuncsMap
实际函数映射表
winux::String const & getName() const
bool isNewAlloc
是否为新分配的Mixed变量
winux::Mixed & getRef() const
winux::String const & getStr() const
std::vector< ExprAtom * > _suffixAtoms
后缀式原子
Expression * _exprObj
所属表达式对象
std::basic_string< tchar > String