FunctionModel This interface provides methods to add and remove script functions in the Expression Editor accessible from Assignment and If program nodes among others.
More...
#include <function_model.h>
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.
Definition at line 45 of file function_model.h.
◆ FunctionModel() [1/3]
| arcs::aubo_scope::FunctionModel::FunctionModel |
( |
FunctionModel & | f | ) |
|
◆ FunctionModel() [2/3]
| arcs::aubo_scope::FunctionModel::FunctionModel |
( |
FunctionModel && | f | ) |
|
◆ ~FunctionModel()
| arcs::aubo_scope::FunctionModel::~FunctionModel |
( |
| ) |
|
◆ FunctionModel() [3/3]
| arcs::aubo_scope::FunctionModel::FunctionModel |
( |
| ) |
|
|
private |
◆ addFunction()
| FunctionPtr arcs::aubo_scope::FunctionModel::addFunction |
( |
const std::string & | name, |
|
|
const std::vector< std::string > & | argumentNames ) |
Add a script function to the Expression Editor.
- Parameters
-
| 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. |
- Returns
- If the script function was successfully added, an object representing the Function will be returned. Null otherwise.
- Exceptions
-
| FunctionException | if the name is illegal or more than five arguments are specified. |
◆ getFunction()
| FunctionPtr arcs::aubo_scope::FunctionModel::getFunction |
( |
const std::string & | name | ) |
|
Get a function by name.
- Parameters
-
| name | The name of the function. |
- Returns
- The function if found, otherwise null.
◆ getFunctions()
| std::vector< FunctionPtr > arcs::aubo_scope::FunctionModel::getFunctions |
( |
| ) |
|
Get all added functions.
- Returns
- A collection of added functions.
◆ removeFunction()
| bool arcs::aubo_scope::FunctionModel::removeFunction |
( |
FunctionPtr | func | ) |
|
Remove a function.
Only functions added by this AuboCap can be removed.
- Parameters
-
- Returns
true, if the function was successfully removed.
◆ DataSwitch
◆ d_
| void* arcs::aubo_scope::FunctionModel::d_ { nullptr } |
|
private |
The documentation for this class was generated from the following file: