|
AuboStudio SDK
0.6.3
|
|
|
|
|
\chinese 函数模型 此接口提供在表达式编辑器中添加和删除脚本函数的方法,该编辑器可从赋值和 If 程序节点等位置访问。 更多...
#include <function_model.h>
Public 成员函数 | |
| FunctionModel (FunctionModel &f) | |
| FunctionModel (FunctionModel &&f) | |
| ~FunctionModel () | |
| FunctionPtr | addFunction (const std::string &name, const std::vector< std::string > &argumentNames) |
| \chinese 添加脚本函数到表达式编辑器。 | |
| bool | removeFunction (FunctionPtr func) |
| \chinese 移除函数。只能移除此AuboCap添加的函数。 | |
| FunctionPtr | getFunction (const std::string &name) |
| \chinese 根据名称获取函数 | |
| std::vector< FunctionPtr > | getFunctions () |
| \chinese 获取所有已添加的函数 | |
Private 成员函数 | |
| FunctionModel () | |
Private 属性 | |
| void * | d_ { nullptr } |
友元 | |
| class | DataSwitch |
\chinese 函数模型 此接口提供在表达式编辑器中添加和删除脚本函数的方法,该编辑器可从赋值和 If 程序节点等位置访问。
添加的函数仅为终端用户提供了一种便捷的方式来使用贡献的函数。特定脚本函数的实现 必须通过 InstallationNodeContribution#generateScript(ScriptWriter) 添加到程序的前导部分。
所有可贡献的函数都必须始终添加到前导部分,无论它们是否被添加到表达式编辑器中。 否则,依赖脚本函数贡献的旧程序可能会停止工作。
另请参见 Function。 \endchinese \english FunctionModel This interface provides methods to add and remove script functions in the Expression Editor accessible from Assignment and If program nodes among others.
Added functions merely serve as an easy way for the end customer to use the contributed functions. The implementation of a given script function must be added in the preamble of program through the use of InstallationNodeContribution#generateScript(ScriptWriter).
The full set of functions which can be contributed must be added in the preamble at all times, regardless of whether they are added to the Expression Editor or not. Otherwise old programs that rely on a script function contribution might stop working.
See also Function. \endenglish
在文件 function_model.h 第 45 行定义.
| arcs::aubo_scope::FunctionModel::FunctionModel | ( | FunctionModel & | f | ) |
| arcs::aubo_scope::FunctionModel::FunctionModel | ( | FunctionModel && | f | ) |
| arcs::aubo_scope::FunctionModel::~FunctionModel | ( | ) |
|
private |
| FunctionPtr arcs::aubo_scope::FunctionModel::addFunction | ( | const std::string & | name, |
| const std::vector< std::string > & | argumentNames ) |
\chinese 添加脚本函数到表达式编辑器。
| name | 函数名称。有效名称必须匹配正则表达式[a-zA-Z][a-zA-Z0-9_]{0,24}, 共25个字符。部分AUBO Robot保留名称不可使用。 |
| argumentNames | 函数参数提示列表,在表达式编辑器中以逗号分隔显示在尖括号 内。最多指定五个参数。 |
| FunctionException | 如果名称非法或指定了超过五个参数。 \endchinese \english Add a script function to the Expression Editor. |
| name | Name of the function. Safe names must match regex [a-zA-Z][a-zA-Z0-9_]{0,24} for a total of 25 characters. |
| argumentNames | Is a list of hints for the function arguments. |
| FunctionException | if the name is illegal or more than five arguments are specified. \endenglish |
| FunctionPtr arcs::aubo_scope::FunctionModel::getFunction | ( | const std::string & | name | ) |
\chinese 根据名称获取函数
| name | 函数名称。 |
| name | The name of the function. |
| std::vector< FunctionPtr > arcs::aubo_scope::FunctionModel::getFunctions | ( | ) |
\chinese 获取所有已添加的函数
| bool arcs::aubo_scope::FunctionModel::removeFunction | ( | FunctionPtr | func | ) |
\chinese 移除函数。只能移除此AuboCap添加的函数。
| function | 要移除的函数。 |
true,否则返回false。 \endchinese \english Remove a function. Only functions added by this AuboCap can be removed. | function | Function to be removed. |
true, if the function was successfully removed. \endenglish
|
friend |
|
private |
在文件 function_model.h 第 119 行定义.