|
fastdo
0.6.16
|
表达式 更多...
#include <eienexpr.hpp>


Public 成员函数 | |
| Expression (ExprPackage *package, VarContext *ctx, Expression *parent, void *data) | |
| virtual | ~Expression () |
| Expression (Expression const &other) | |
| Expression & | operator= (Expression const &other) |
| virtual ExprAtom * | clone () const override |
| 克隆一个atom 更多... | |
| virtual winux::String | toString () const override |
| 字符串形式输出 更多... | |
| virtual bool | evaluate (winux::SimplePointer< ExprOperand > *result) const override |
| 计算,结果不一定是值,还可以是其他操作数 更多... | |
| winux::String | toSuffixString () const |
| bool | isEmpty () const |
| ExprPackage * | getPackage () const |
| 获取表达式包 更多... | |
| VarContext * | getVarContext () const |
| 获取变量场景 更多... | |
| void * | getDataPtr () const |
| 取得外部数据对象指针 更多... | |
| bool | getVar (winux::String const &name, winux::Mixed **outVarPtr, VarContext **outVarCtx=nullptr) const |
| 取得变量 更多... | |
| winux::Mixed const & | getVar (winux::String const &name, VarContext **outVarCtx=nullptr) const |
| 取得变量值 更多... | |
| void | setVar (winux::String const &name, winux::Mixed const &val) |
| 设置变量值 更多... | |
| void | clear () |
| 清空所有表达式原子,可以再次参与解析 更多... | |
| void | _addAtom (ExprAtom *atom) |
| 添加一个原子到后缀式中,atom必须是new的或者clone()的 更多... | |
Public 成员函数 继承自 eienexpr::ExprOperand | |
| ExprOperand () | |
| virtual | ~ExprOperand () |
| winux::Mixed | val () const |
| 把操作数计算成可用的值,如果不能算,则抛出异常 更多... | |
| bool | evaluateMixedPtr (winux::Mixed **ppv) const |
| 求值取得Reference或Identifier,获取内部的Mixed指针 更多... | |
| ExprOperandType | getOperandType () const |
| 取得操作数类型 更多... | |
Public 成员函数 继承自 eienexpr::ExprAtom | |
| ExprAtom () | |
| virtual | ~ExprAtom () |
| ExprAtomType | getAtomType () const |
| 原子类型 更多... | |
Public 属性 | |
| std::vector< ExprAtom * > | _suffixAtoms |
| 后缀式原子 更多... | |
| ExprPackage * | _package |
| 表达式包 更多... | |
| VarContext * | _varCtx |
| 变量场景 更多... | |
| Expression * | _parent |
| 父表达式 更多... | |
| void * | _data |
| 外部数据 更多... | |
友元 | |
| class | ExprIdentifier |
| class | ExprParser |
额外继承的成员函数 | |
Public 类型 继承自 eienexpr::ExprOperand | |
| enum | ExprOperandType { eotLiteral, eotIdentifier, eotReference, eotFunction, eotExpression } |
Public 类型 继承自 eienexpr::ExprAtom | |
| enum | ExprAtomType { eatOperator, eatOperand } |
Protected 属性 继承自 eienexpr::ExprOperand | |
| ExprOperandType | _operandType |
Protected 属性 继承自 eienexpr::ExprAtom | |
| ExprAtomType | _atomType |
表达式
在文件 eienexpr.hpp 第 283 行定义.
| eienexpr::Expression::Expression | ( | ExprPackage * | package, |
| VarContext * | ctx, | ||
| Expression * | parent, | ||
| void * | data | ||
| ) |
|
virtual |
| eienexpr::Expression::Expression | ( | Expression const & | other | ) |
| Expression& eienexpr::Expression::operator= | ( | Expression const & | other | ) |
|
overridevirtual |
克隆一个atom
实现了 eienexpr::ExprAtom.
|
overridevirtual |
字符串形式输出
实现了 eienexpr::ExprAtom.
|
overridevirtual |
计算,结果不一定是值,还可以是其他操作数
| winux::String eienexpr::Expression::toSuffixString | ( | ) | const |
|
inline |
在文件 eienexpr.hpp 第 297 行定义.
|
inline |
获取表达式包
在文件 eienexpr.hpp 第 300 行定义.
| VarContext* eienexpr::Expression::getVarContext | ( | ) | const |
获取变量场景
| void* eienexpr::Expression::getDataPtr | ( | ) | const |
取得外部数据对象指针
| bool eienexpr::Expression::getVar | ( | winux::String const & | name, |
| winux::Mixed ** | outVarPtr, | ||
| VarContext ** | outVarCtx = nullptr |
||
| ) | const |
取得变量
如果当前表达式的变量场景里没有则向父表达式的变量场景里查找,如果最终都没有,返回false。
如果找到则返回变量的指针和变量场景对象的指针
| winux::Mixed const& eienexpr::Expression::getVar | ( | winux::String const & | name, |
| VarContext ** | outVarCtx = nullptr |
||
| ) | const |
取得变量值
| void eienexpr::Expression::setVar | ( | winux::String const & | name, |
| winux::Mixed const & | val | ||
| ) |
设置变量值
| void eienexpr::Expression::clear | ( | ) |
清空所有表达式原子,可以再次参与解析
| void eienexpr::Expression::_addAtom | ( | ExprAtom * | atom | ) |
添加一个原子到后缀式中,atom必须是new的或者clone()的
|
friend |
在文件 eienexpr.hpp 第 332 行定义.
|
friend |
在文件 eienexpr.hpp 第 333 行定义.
| std::vector<ExprAtom *> eienexpr::Expression::_suffixAtoms |
后缀式原子
在文件 eienexpr.hpp 第 323 行定义.
| ExprPackage* eienexpr::Expression::_package |
表达式包
在文件 eienexpr.hpp 第 324 行定义.
| VarContext* eienexpr::Expression::_varCtx |
变量场景
在文件 eienexpr.hpp 第 325 行定义.
| Expression* eienexpr::Expression::_parent |
父表达式
在文件 eienexpr.hpp 第 326 行定义.
| void* eienexpr::Expression::_data |
外部数据
在文件 eienexpr.hpp 第 327 行定义.