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 71 virtual ExprAtom * clone()
const = 0;
97 ExprOperator(
winux::String const & oprStr =
"",
bool isUnary =
false,
bool isRight =
false,
short level = 0, OperatorFunction oprFn = NULL );
117 this->_oprStr == opr.
_oprStr &&
119 this->_level == opr.
_level &&
121 this->_oprFn == opr.
_oprFn 198 static bool NumberPossibility(
winux::String const & str,
bool * isFloat = NULL,
bool * isExp = NULL );
304 bool isEmpty()
const {
return this->_suffixAtoms.empty(); }
313 void * getDataPtr()
const;
408 std::map< winux::String, VariableStruct >
_vars;
425 bool delOpr(
winux::String const & oprStr,
bool isUnary,
bool isRight );
446 int getAllFuncs( std::vector< std::pair< winux::String, ExprFunc::FuncFunction > > * funcs )
const;
449 std::vector<ExprOperator> _operators;
471 enum ExprParseContext
473 epcExpr, epcFuncParams, epcString, epcStrAntiSlashes
484 #endif //__EIENEXPR_HPP__ XString< char > AnsiString
ExprError(int errNo, winux::AnsiString const &err)
winux::String _funcName
函数名
bool(* OperatorFunction)(Expression *e, ExprOperand *arOperands[], short n, winux::SimplePointer< ExprOperand > *outRetValue, void *data)
ExprOperandType _operandType
std::map< winux::String, FuncFunction > StringFuncMap
ExprAtomType getAtomType() const
原子类型
ExprPackage * getPackage() const
获取表达式包
bool(* FuncFunction)(Expression *e, std::vector< Expression * > ¶ms, winux::SimplePointer< ExprOperand > *outRetValue, void *data)
std::vector< Expression * > _params
参数,也是表达式
winux::Mixed * _collection
ExprPackage * _package
表达式包
std::map< winux::String, VariableStruct > _vars
Expression * getExprObj() const
获取关联的表达式对象
winux::String const & getName() const
bool isSameLevel(ExprOperator const &opr) const
判断两个算符是否结合性和优先级都相同
bool isNewAlloc
是否为新分配的Mixed变量
winux::Mixed & getRef() const
winux::String const & getStr() const
std::vector< ExprAtom * > _suffixAtoms
后缀式原子
Expression * _exprObj
所属表达式对象