LSPFunction Class¶
-
class LSPFunction¶
A function can be either a user-defined function or a built-in function. It is possible to create external functions from the modeler API and call them in the modeler. See
LSPFunctor
for more information on how to create external functions.- See:
- Since:
10.0
Summary¶
Gets the name of the function. |
|
Calls the function with no argument and returns the result. |
|
Calls the function with the provided arguments and returns the result. |
|
Calls the function with the provided arguments and returns the result. |
|
Calls the function with the provided arguments. |
|
Returns the function as an LSPValue. |
Returns the function as an LSPValue. |
Functions¶
-
std::string LSPFunction::getDeclaredName() const¶
Gets the name of the function. The name of the function does not necessarily reflect the name of the variable(s) to which the function is associated. The name is mainly used to identify the function in stack traces when exceptions occur.
-
LSPValue LSPFunction::call()¶
Calls the function with no argument and returns the result.
- Returns:
Return value of the call.
-
LSPValue LSPFunction::call(const std::vector<LSPValue> &arguments)¶
Calls the function with the provided arguments and returns the result.
- Parameters:
arguments – List of arguments.
- Returns:
Return value of the call.
-
LSPValue LSPFunction::call(const LSPValue *arguments, int nbArguments)¶
Calls the function with the provided arguments and returns the result.
- Parameters:
arguments – Pointer to the first argument.
nbArguments – Number of arguments.
- Returns:
Return value of the call.
-
template<typename T>
LSPValue LSPFunction::call(T begin, T end)¶ Calls the function with the provided arguments. The arguments must be iterators referencing LSPValues.
- Parameters:
T – Type of an iterator referencing LSPValues.
begin – Iterator to the beginning of the arguments.
end – Iterator to the end of the arguments.
- Returns:
Return value of the call.
-
LSPValue LSPFunction::asValue() const¶
Returns the function as an
LSPValue
.- See:
Overloaded operators¶
-
explicit operator LSPFunction::LSPValue() const¶
Returns the function as an
LSPValue
.- See: