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