![]() |
LibraryLink Utilities
3.0.1
Modern C++ wrapper over LibraryLink and WSTP
|
Structure representing any function in Wolfram Language, i.e. a head plus number of arguments.
Inheritance diagram for LLU::WS::Function:
Collaboration diagram for LLU::WS::Function:#include <Utilities.h>
Public Member Functions | |
| Function () | |
| Default constructor. More... | |
| Function (const std::string &h) | |
| Create a Function with given head but unknown number of arguments. More... | |
| Function (const std::string &h, int argCount) | |
| Construct a Function with given head and number of arguments. More... | |
| int | getArgc () const |
| Get argument count. More... | |
| void | setArgc (int newArgc) |
| Set argument count. More... | |
| const std::string & | getHead () const |
| Get Symbol name/head. More... | |
| void | setHead (std::string h) |
| Set Symbol name/head. More... | |
|
inline |
Default constructor.
The head is empty and number of arguments is set to a dummy value. This constructor should only be used to create a Function right before calling WSStream::operator>> on it, which will read a function from top-level.
|
inlineexplicit |
Create a Function with given head but unknown number of arguments.
You can later call WSStream::operator>> on such constructed Function to populate argument count with a value read from top-level.
| h | - function head |
|
inline |
Construct a Function with given head and number of arguments.
| h | - function head |
| argCount | - number of arguments this function takes |
| int LLU::WS::Function::getArgc | ( | ) | const |
Get argument count.
|
inherited |
Get Symbol name/head.
| void LLU::WS::Function::setArgc | ( | int | newArgc | ) |
Set argument count.
| newArgc | - new value for argument count |