|
fastdo
0.6.16
|
变量场景类 更多...
#include <eienexpr.hpp>

类 | |
| struct | VariableStruct |
Public 成员函数 | |
| VarContext (winux::Mixed *collection=nullptr) | |
| virtual | ~VarContext () |
| VarContext (VarContext const &other) | |
| VarContext & | operator= (VarContext const &other) |
| void | setMixedCollection (winux::Mixed *collection) |
| 设置一个Mixed(Collection)作为变量场景 更多... | |
| void | set (winux::String const &name, winux::Mixed const &v) |
| 设置一个变量,并直接给值 更多... | |
| winux::Mixed & | set (winux::String const &name) |
| 设置一个变量,并返回其引用,方便自由修改 更多... | |
| void | setPtr (winux::String const &name, winux::Mixed *v) |
| 外部引用一个Mixed指针,要确保在表达式运行期间指针所指的内容存在 更多... | |
| winux::Mixed *& | setPtr (winux::String const &name) |
| 删除已经存在的名称,然后设置一个名称,并返回其指针引用以便赋值为其他外部引用的指针 更多... | |
| bool | unset (winux::String const &name) |
| bool | has (winux::String const &name) const |
| bool | get (winux::String const &name, winux::Mixed **outVarPtr) const |
| winux::Mixed const & | get (winux::String const &name) const |
| void | clear () |
| 清空所有变量 更多... | |
| winux::Mixed | dump () const |
| 倾泻出所有变量 更多... | |
Protected 属性 | |
| winux::Mixed * | _collection |
| std::map< winux::String, VariableStruct > | _vars |
友元 | |
| class | ExprParser |
变量场景类
在文件 eienexpr.hpp 第 337 行定义.
| eienexpr::VarContext::VarContext | ( | winux::Mixed * | collection = nullptr | ) |
|
virtual |
| eienexpr::VarContext::VarContext | ( | VarContext const & | other | ) |
| VarContext& eienexpr::VarContext::operator= | ( | VarContext const & | other | ) |
| void eienexpr::VarContext::setMixedCollection | ( | winux::Mixed * | collection | ) |
设置一个Mixed(Collection)作为变量场景
| void eienexpr::VarContext::set | ( | winux::String const & | name, |
| winux::Mixed const & | v | ||
| ) |
设置一个变量,并直接给值
如果不是设置Mixed(Collection)场景,内部会new一个Mixed。如果name表示的变量已存在,则直接引用其进行赋值操作 如果是设置了Mixed(Collection)场景,内部会创建一对K/V。如果name表示的变量已存在,则直接引用其进行赋值操作
| winux::Mixed& eienexpr::VarContext::set | ( | winux::String const & | name | ) |
设置一个变量,并返回其引用,方便自由修改
如果不是设置Mixed(Collection)场景,内部会new一个Mixed并返回其引用。如果name表示的变量已存在,则直接返回其引用 如果是设置了Mixed(Collection)场景,内部会创建一对K/V并返回Value的引用。如果name表示的变量已存在,则直接返回其引用
| void eienexpr::VarContext::setPtr | ( | winux::String const & | name, |
| winux::Mixed * | v | ||
| ) |
外部引用一个Mixed指针,要确保在表达式运行期间指针所指的内容存在
如果name表示的变量已存在,则删除后重新建立 无论设不设置Mixed(Collection)场景都会删除后重新建立
| winux::Mixed* & eienexpr::VarContext::setPtr | ( | winux::String const & | name | ) |
删除已经存在的名称,然后设置一个名称,并返回其指针引用以便赋值为其他外部引用的指针
如果name表示的变量已存在,则删除后重新建立 无论设不设置Mixed(Collection)场景都会删除后重新建立
| bool eienexpr::VarContext::unset | ( | winux::String const & | name | ) |
| bool eienexpr::VarContext::has | ( | winux::String const & | name | ) | const |
| bool eienexpr::VarContext::get | ( | winux::String const & | name, |
| winux::Mixed ** | outVarPtr | ||
| ) | const |
| winux::Mixed const& eienexpr::VarContext::get | ( | winux::String const & | name | ) | const |
| void eienexpr::VarContext::clear | ( | ) |
清空所有变量
| winux::Mixed eienexpr::VarContext::dump | ( | ) | const |
倾泻出所有变量
|
friend |
在文件 eienexpr.hpp 第 403 行定义.
|
protected |
在文件 eienexpr.hpp 第 400 行定义.
|
protected |
在文件 eienexpr.hpp 第 401 行定义.