![]() |
LibraryLink Utilities
3.0.1
Modern C++ wrapper over LibraryLink and WSTP
|
Manages arguments exchanged between the paclet C++ code and LibraryLink interface.
MArgumentManager provides a safe way to access MArguments received from LibraryLink and takes care of memory management both for in- and out- arguments. Using MArgumentManager one can perform generic operations on NumericArrays, Tensors and Images independent of their data type.
#include <MArgumentManager.h>
Classes | |
| struct | CustomType |
| Helper structure that can be used to register user-defined argument types in LLU. More... | |
| struct | Getter |
| Helper structure to fully customize the way MArgumentManager reads T as argument type. More... | |
| struct | Managed |
| Helper struct to "attach" a passing mode to container type when passing it as template argument to MArgumentManager::getTuple. More... | |
| struct | Setter |
| Helper structure to fully customize the way MArgumentManager sets an object of type T as result of a library function. More... | |
Public Types | |
| using | size_type = std::size_t |
| Size type for indexing the list of arguments that MArgumentManager manages. More... | |
| template<typename T > | |
| using | RequestedType = typename RequestedTypeImpl< T >::type |
| RequestedType<T> is usually just T and is used as return type of MArgumentManager::get(size_type) More... | |
Public Member Functions | |
| MArgumentManager (mint Argc, MArgument *Args, MArgument &Res) | |
| Constructor. More... | |
| MArgumentManager (WolframLibraryData ld, mint Argc, MArgument *Args, MArgument &Res) | |
| Constructor. More... | |
| bool | getBoolean (size_type index) const |
Get MArgument of type mbool at position index. More... | |
| double | getReal (size_type index) const |
Get MArgument of type mreal at position index. More... | |
| template<typename T > | |
| T | getInteger (size_type index) const |
Get MArgument of type mint at position index with extra static_cast if needed. More... | |
| std::complex< double > | getComplex (size_type index) const |
Get MArgument of type mcomplex at position index. More... | |
| char * | getCString (size_type index) const |
Get value of MArgument of type "UTF8String" at position index. More... | |
| std::string | getString (size_type index) const |
Get value of MArgument of type "UTF8String" at position index. More... | |
| template<typename T , Passing Mode = Passing::Automatic> | |
| NumericArray< T > | getNumericArray (size_type index) const |
Get MArgument of type MNumericArray at position index and wrap it into NumericArray. More... | |
| template<Passing Mode = Passing::Automatic> | |
| GenericNumericArray | getGenericNumericArray (size_type index) const |
Get MArgument of type MNumericArray at position index and wrap it into generic MContainer wrapper. More... | |
| MNumericArray | getMNumericArray (size_type index) const |
Get MArgument of type MNumericArray at position index. More... | |
| template<typename T , Passing Mode = Passing::Automatic> | |
| Tensor< T > | getTensor (size_type index) const |
Get MArgument of type MTensor at position index and wrap it into Tensor object. More... | |
| template<Passing Mode = Passing::Automatic> | |
| GenericTensor | getGenericTensor (size_type index) const |
Get MArgument of type MTensor at position index and wrap it into generic MContainer wrapper. More... | |
| MTensor | getMTensor (size_type index) const |
Get MArgument of type MTensor at position index. More... | |
| template<typename T , Passing Mode = Passing::Automatic> | |
| SparseArray< T > | getSparseArray (size_type index) const |
Get MArgument of type MSparseArray at position index and wrap it into SparseArray. More... | |
| template<Passing Mode = Passing::Automatic> | |
| GenericSparseArray | getGenericSparseArray (size_type index) const |
Get MArgument of type MSparseArray at position index and wrap it into generic MContainer wrapper. More... | |
| MSparseArray | getMSparseArray (size_type index) const |
Get MArgument of type MSparseArray at position index. More... | |
| template<typename T , Passing Mode = Passing::Automatic> | |
| Image< T > | getImage (size_type index) const |
Get MArgument of type MImage at position index and wrap it into Image object. More... | |
| template<Passing Mode = Passing::Automatic> | |
| GenericImage | getGenericImage (size_type index) const |
Get MArgument of type MImage at position index and wrap it into generic MContainer wrapper. More... | |
| MImage | getMImage (size_type index) const |
Get MArgument of type MImage at position index. More... | |
| template<typename T , Passing Mode = Passing::Automatic> | |
| DataList< T > | getDataList (size_type index) const |
Get DataStore with all nodes of the same type from MArgument at position index. More... | |
| template<Passing Mode = Passing::Automatic> | |
| GenericDataList | getGenericDataList (size_type index) const |
Get MArgument of type DataStore at position index and wrap it into generic MContainer wrapper. More... | |
| DataStore | getDataStore (size_type index) const |
Get MArgument of type DataStore at position index. More... | |
| template<class ManagedExpr , class DynamicType = ManagedExpr> | |
| DynamicType & | getManagedExpression (size_type index, ManagedExpressionStore< ManagedExpr > &store) const |
| Get a reference to an instance of Managed Expression that was sent from Wolfram Language as argument to a library function. More... | |
| template<class ManagedExpr , class DynamicType = ManagedExpr> | |
| std::shared_ptr< DynamicType > | getManagedExpressionPtr (size_type index, ManagedExpressionStore< ManagedExpr > &store) const |
| Get a shared pointer to an instance of Managed Expression that was sent from Wolfram Language as argument to a library function. More... | |
| template<typename T > | |
| RequestedType< T > | get (size_type index) const |
| Extract library function argument at given index and convert it from MArgument to a desired type. More... | |
| template<typename... ArgTypes> | |
| std::tuple< RequestedType< ArgTypes >... > | getTuple (size_type index=0) const |
| Extract arguments from the Manager and return them as values of given types. More... | |
| template<typename... ArgTypes> | |
| std::tuple< RequestedType< ArgTypes >... > | getTuple (std::array< size_type, sizeof...(ArgTypes)> indices) const |
| Extract arguments from the Manager at given positions and return them as values of given types. More... | |
| void | setBoolean (bool result) noexcept |
Set result as output MArgument. More... | |
| void | setReal (double result) noexcept |
Set result as output MArgument. More... | |
| void | setInteger (mint result) noexcept |
Set result as output MArgument. More... | |
| template<typename T > | |
| bool | setMintAndCheck (T result) noexcept |
Set result as output MArgument and check for overflow. More... | |
| void | setComplex (std::complex< double > c) noexcept |
Set c as output MArgument. More... | |
| void | setString (const std::string &str) |
Set str as output MArgument. More... | |
| void | setString (const char *str) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
| void | setString (std::string &&str) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
| template<typename T > | |
| void | setNumericArray (const NumericArray< T > &na) |
Set MNumericArray wrapped by na as output MArgument. More... | |
| void | setMNumericArray (MNumericArray na) |
| Set MNumericArray as output MArgument. More... | |
| template<typename T > | |
| void | setTensor (const Tensor< T > &ten) |
Set MTensor wrapped by ten as output MArgument. More... | |
| void | setMTensor (MTensor t) |
| Set MTensor as output MArgument. More... | |
| template<typename T > | |
| void | setImage (const Image< T > &im) |
Set MImage wrapped by im as output MArgument. More... | |
| void | setMImage (MImage im) |
| Set MImage as output MArgument. More... | |
| template<typename T > | |
| void | setDataList (const DataList< T > &ds) |
Set DataStore wrapped in DataList ds as output MArgument. More... | |
| void | setDataStore (DataStore ds) |
| Set DataStore as output MArgument. More... | |
| template<typename T > | |
| void | setSparseArray (const SparseArray< T > &sa) |
Set MSparseArray wrapped by sa as output MArgument. More... | |
| void | setMSparseArray (MSparseArray sa) |
| Set MSparseArray as output MArgument. More... | |
| void | set (bool result) noexcept |
Set result as output MArgument. More... | |
| void | set (double result) noexcept |
Set result as output MArgument. More... | |
| void | set (mint result) noexcept |
Set result as output MArgument. More... | |
| void | set (std::complex< double > c) noexcept |
Set c as output MArgument. More... | |
| void | set (const std::string &str) |
Set str as output MArgument. More... | |
| void | set (const char *str) |
Set str as output MArgument. More... | |
| void | set (std::string &&str) |
Set str as output MArgument. More... | |
| template<typename T > | |
| void | set (const NumericArray< T > &na) |
Set MNumericArray wrapped by na as output MArgument. More... | |
| void | set (const GenericNumericArray &na) |
Set MNumericArray wrapped by na as output MArgument. More... | |
| template<typename T > | |
| void | set (const SparseArray< T > &ten) |
Set MSparseArray wrapped by sa as output MArgument. More... | |
| void | set (const GenericSparseArray &t) |
Set MSparseArray wrapped by t as output MArgument. More... | |
| template<typename T > | |
| void | set (const Tensor< T > &ten) |
Set MTensor wrapped by ten as output MArgument. More... | |
| void | set (const GenericTensor &t) |
Set MTensor wrapped by t as output MArgument. More... | |
| template<typename T > | |
| void | set (const Image< T > &im) |
Set MImage wrapped by im as output MArgument. More... | |
| void | set (const GenericImage &im) |
Set MImage wrapped by im as output MArgument. More... | |
| template<typename T > | |
| void | set (const DataList< T > &ds) |
Set DataStore wrapped in DataList ds as output MArgument. More... | |
| void | set (const GenericDataList &ds) |
Set DataStore wrapped by ds as output MArgument. More... | |
| template<typename T > | |
| void | set (const T &arg) |
| Set given value as a result of the library function. More... | |
| ProgressMonitor | getProgressMonitor (double step=ProgressMonitor::getDefaultStep()) const |
| Get ProgressMonitor shared with WL Kernel. More... | |
| numericarray_data_t | getNumericArrayType (size_type index) const |
Get type of MNumericArray at position index in Args. More... | |
| template<Passing Mode, class Operator , class... OpArgs> | |
| void | operateOnNumericArray (size_type index, OpArgs &&... opArgs) |
Perform operation on NumericArray created from MNumericArray argument at position index in Args. More... | |
| template<Passing Mode = Passing::Automatic, class Operator > | |
| void | operateOnNumericArray (size_type index, Operator &&op) |
Perform operation on NumericArray created from MNumericArray argument at position index in Args. More... | |
| unsigned char | getTensorType (size_type index) const |
Get type of MTensor at position index in Args. More... | |
| template<Passing Mode, class Operator , class... Args> | |
| void | operateOnTensor (size_type index, Args &&... opArgs) |
Perform operation on Tensor created from MTensor argument at position index in Args. More... | |
| template<Passing Mode = Passing::Automatic, class Operator > | |
| void | operateOnTensor (size_type index, Operator &&op) |
Perform operation on Tensor created from MTensor argument at position index in Args. More... | |
| imagedata_t | getImageType (size_type index) const |
Get type of MImage at position index in Args. More... | |
| template<Passing Mode, class Operator , class... Args> | |
| void | operateOnImage (size_type index, Args &&... opArgs) |
Perform operation on Image created from MImage argument at position index in Args. More... | |
| template<Passing Mode = Passing::Automatic, class Operator > | |
| void | operateOnImage (size_type index, Operator &&op) |
Perform operation on Image created from MImage argument at position index in Args. More... | |
| using LLU::MArgumentManager::RequestedType = typename RequestedTypeImpl<T>::type |
RequestedType<T> is usually just T and is used as return type of MArgumentManager::get(size_type)
| using LLU::MArgumentManager::size_type = std::size_t |
Size type for indexing the list of arguments that MArgumentManager manages.
| LLU::MArgumentManager::MArgumentManager | ( | mint | Argc, |
| MArgument * | Args, | ||
| MArgument & | Res | ||
| ) |
Constructor.
| [in] | Argc | - number of MArguments provided |
| [in] | Args | - MArguments provided |
| [in] | Res | - reference to output MArgument |
| LLU::MArgumentManager::MArgumentManager | ( | WolframLibraryData | ld, |
| mint | Argc, | ||
| MArgument * | Args, | ||
| MArgument & | Res | ||
| ) |
Constructor.
| [in] | ld | - library data |
| [in] | Argc | - number of MArguments provided |
| [in] | Args | - MArguments provided |
| [in] | Res | - reference to output MArgument |
|
inline |
Extract library function argument at given index and convert it from MArgument to a desired type.
| T | - any type, for types not supported by default developers may specialize this function template |
| index | - position of desired argument in Args |
| bool LLU::MArgumentManager::getBoolean | ( | size_type | index | ) | const |
Get MArgument of type mbool at position index.
| [in] | index | - position of desired MArgument in Args |
index | ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| std::complex< double > LLU::MArgumentManager::getComplex | ( | size_type | index | ) | const |
Get MArgument of type mcomplex at position index.
| [in] | index | - position of desired MArgument in Args |
index converted to std::complex<double> | ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| char * LLU::MArgumentManager::getCString | ( | size_type | index | ) | const |
Get value of MArgument of type "UTF8String" at position index.
| [in] | index | - position of desired MArgument in Args |
| LLErrorCode::MArgumentIndexError | - if index is out-of-bounds |
| DataList<T> LLU::MArgumentManager::getDataList | ( | size_type | index | ) | const |
Get DataStore with all nodes of the same type from MArgument at position index.
| T | - type of data stored in each node of DataStore, it T is MArgumentType::MArgument it will accept any node |
| [in] | index | - position of desired MArgument in Args |
index | ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| DataStore LLU::MArgumentManager::getDataStore | ( | size_type | index | ) | const |
Get MArgument of type DataStore at position index.
| [in] | index | - position of desired MArgument in Args |
index | ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| GenericDataList LLU::MArgumentManager::getGenericDataList | ( | size_type | index | ) | const |
Get MArgument of type DataStore at position index and wrap it into generic MContainer wrapper.
| Mode | - passing mode to be used |
| index | - position of desired MArgument in Args |
| GenericImage LLU::MArgumentManager::getGenericImage | ( | size_type | index | ) | const |
Get MArgument of type MImage at position index and wrap it into generic MContainer wrapper.
| Mode | - passing mode to be used |
| index | - position of desired MArgument in Args |
| GenericNumericArray LLU::MArgumentManager::getGenericNumericArray | ( | size_type | index | ) | const |
Get MArgument of type MNumericArray at position index and wrap it into generic MContainer wrapper.
| Mode | - passing mode to be used |
| index | - position of desired MArgument in Args |
| GenericSparseArray LLU::MArgumentManager::getGenericSparseArray | ( | size_type | index | ) | const |
Get MArgument of type MSparseArray at position index and wrap it into generic MContainer wrapper.
| Mode | - passing mode to be used |
| index | - position of desired MArgument in Args |
| GenericTensor LLU::MArgumentManager::getGenericTensor | ( | size_type | index | ) | const |
Get MArgument of type MTensor at position index and wrap it into generic MContainer wrapper.
| Mode | - passing mode to be used |
| index | - position of desired MArgument in Args |
| Image<T> LLU::MArgumentManager::getImage | ( | size_type | index | ) | const |
Get MArgument of type MImage at position index and wrap it into Image object.
| T | - type of data stored in Image |
| [in] | index | - position of desired MArgument in Args |
index | ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| imagedata_t LLU::MArgumentManager::getImageType | ( | size_type | index | ) | const |
Get type of MImage at position index in Args.
| [in] | index | - position of desired MArgument in Args |
| ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| T LLU::MArgumentManager::getInteger | ( | size_type | index | ) | const |
Get MArgument of type mint at position index with extra static_cast if needed.
| T | - integral type to convert mint to |
| [in] | index | - position of desired MArgument in Args |
index converted to T | ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| DynamicType& LLU::MArgumentManager::getManagedExpression | ( | size_type | index, |
| ManagedExpressionStore< ManagedExpr > & | store | ||
| ) | const |
Get a reference to an instance of Managed Expression that was sent from Wolfram Language as argument to a library function.
| ManagedExpr | - registered Managed Expression class |
| DynamicType | - actual type of Managed Expression, this must be ManagedExpr or its subclass |
| index | - position of desired argument in Args |
| store | - Managed Expression store that manages expressions of type ManagedExpr |
| std::shared_ptr<DynamicType> LLU::MArgumentManager::getManagedExpressionPtr | ( | size_type | index, |
| ManagedExpressionStore< ManagedExpr > & | store | ||
| ) | const |
Get a shared pointer to an instance of Managed Expression that was sent from Wolfram Language as argument to a library function.
| ManagedExpr | - registered Managed Expression class |
| DynamicType | - actual type of Managed Expression, this must be ManagedExpr or its subclass |
| index | - position of desired argument in Args |
| store | - Managed Expression store that manages expressions of type ManagedExpr |
| MImage LLU::MArgumentManager::getMImage | ( | size_type | index | ) | const |
Get MArgument of type MImage at position index.
| [in] | index | - position of desired MArgument in Args |
index | ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| MNumericArray LLU::MArgumentManager::getMNumericArray | ( | size_type | index | ) | const |
Get MArgument of type MNumericArray at position index.
| [in] | index | - position of desired MArgument in Args |
index interpreted as MNumericArray | ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| MSparseArray LLU::MArgumentManager::getMSparseArray | ( | size_type | index | ) | const |
Get MArgument of type MSparseArray at position index.
| [in] | index | - position of desired MArgument in Args |
index interpreted as MSparseArray | ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| MTensor LLU::MArgumentManager::getMTensor | ( | size_type | index | ) | const |
Get MArgument of type MTensor at position index.
| [in] | index | - position of desired MArgument in Args |
index | ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| NumericArray<T> LLU::MArgumentManager::getNumericArray | ( | size_type | index | ) | const |
Get MArgument of type MNumericArray at position index and wrap it into NumericArray.
| T | - type of data stored in NumericArray |
| [in] | index | - position of desired MArgument in Args |
index | ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| numericarray_data_t LLU::MArgumentManager::getNumericArrayType | ( | size_type | index | ) | const |
Get type of MNumericArray at position index in Args.
| [in] | index | - position of desired MArgument in Args |
| ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| ProgressMonitor LLU::MArgumentManager::getProgressMonitor | ( | double | step = ProgressMonitor::getDefaultStep() | ) | const |
Get ProgressMonitor shared with WL Kernel.
| step | - step value for progress monitor |
getProgressMonitor is undefined. | double LLU::MArgumentManager::getReal | ( | size_type | index | ) | const |
Get MArgument of type mreal at position index.
| [in] | index | - position of desired MArgument in Args |
index | ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| SparseArray<T> LLU::MArgumentManager::getSparseArray | ( | size_type | index | ) | const |
Get MArgument of type MSparseArray at position index and wrap it into SparseArray.
| T | - type of data stored in SparseArray |
| [in] | index | - position of desired MArgument in Args |
index | ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| std::string LLU::MArgumentManager::getString | ( | size_type | index | ) | const |
Get value of MArgument of type "UTF8String" at position index.
| [in] | index | - position of desired MArgument in Args |
index | LLErrorCode::MArgumentIndexError | - if index is out-of-bounds |
| Tensor<T> LLU::MArgumentManager::getTensor | ( | size_type | index | ) | const |
Get MArgument of type MTensor at position index and wrap it into Tensor object.
| T | - type of data stored in Tensor |
| [in] | index | - position of desired MArgument in Args |
index | ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| unsigned char LLU::MArgumentManager::getTensorType | ( | size_type | index | ) | const |
Get type of MTensor at position index in Args.
| [in] | index | - position of desired MArgument in Args |
| ErrorName::MArgumentIndexError | - if index is out-of-bounds |
|
inline |
Extract arguments from the Manager and return them as values of given types.
| ArgTypes | - types that determine how each extracted argument will be returned |
|
inline |
Extract arguments from the Manager at given positions and return them as values of given types.
| ArgTypes | - types that determine how each extracted argument will be returned |
| indices | - position of desired arguments, need not be sorted, may contain repeated values |
| void LLU::MArgumentManager::operateOnImage | ( | size_type | index, |
| Args &&... | opArgs | ||
| ) |
Perform operation on Image created from MImage argument at position index in Args.
| Mode | - passing mode of the Image that will be processed |
| Operator | - any callable class |
| OpArgs... | - types of arguments of operator() in class Operator |
| [in] | index | - position of MImage in Args |
| [in] | opArgs | - arguments of Operator::operator() |
| ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| ErrorName::MArgumentImageError | - if MImage argument has incorrect type |
| void LLU::MArgumentManager::operateOnImage | ( | size_type | index, |
| Operator && | op | ||
| ) |
Perform operation on Image created from MImage argument at position index in Args.
| Mode | - passing mode of the Image that will be processed |
| Operator | - any callable class |
| [in] | index | - position of MImage in Args |
| [in] | op | - callable object (possibly lambda) that takes only one argument - an Image |
| ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| ErrorName::MArgumentImageError | - if MImage argument has incorrect type |
| void LLU::MArgumentManager::operateOnNumericArray | ( | size_type | index, |
| OpArgs &&... | opArgs | ||
| ) |
Perform operation on NumericArray created from MNumericArray argument at position index in Args.
| Mode | - passing mode of the NumericArray that will be processed |
| Operator | - any callable class |
| OpArgs... | - types of arguments of operator() in class Operator |
| [in] | index | - position of MNumericArray in Args |
| [in] | opArgs | - arguments of Operator::operator() |
| ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| void LLU::MArgumentManager::operateOnNumericArray | ( | size_type | index, |
| Operator && | op | ||
| ) |
Perform operation on NumericArray created from MNumericArray argument at position index in Args.
| Mode | - passing mode of the NumericArray that will be processed |
| Operator | - any callable class |
| [in] | index | - position of MNumericArray in Args |
| [in] | op | - callable object (possibly lambda) that takes only one argument - a NumericArray |
| ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| void LLU::MArgumentManager::operateOnTensor | ( | size_type | index, |
| Args &&... | opArgs | ||
| ) |
Perform operation on Tensor created from MTensor argument at position index in Args.
| Mode | - passing mode of the Tensor that will be processed |
| Operator | - any callable class |
| OpArgs... | - types of arguments of operator() in class Operator |
| [in] | index | - position of MTensor in Args |
| [in] | opArgs | - arguments of Operator::operator() |
| ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| ErrorName::MArgumentTensorError | - if MTensor argument has incorrect type |
| void LLU::MArgumentManager::operateOnTensor | ( | size_type | index, |
| Operator && | op | ||
| ) |
Perform operation on Tensor created from MTensor argument at position index in Args.
| Mode | - passing mode of the Tensor that will be processed |
| Operator | - any callable class |
| [in] | index | - position of MTensor in Args |
| [in] | op | - callable object (possibly lambda) that takes only one argument - a Tensor |
| ErrorName::MArgumentIndexError | - if index is out-of-bounds |
| ErrorName::MArgumentTensorError | - if MTensor argument has incorrect type |
|
inlinenoexcept |
Set result as output MArgument.
| [in] | result | - boolean value to be returned to LibraryLink |
|
inline |
Set str as output MArgument.
| [in] | str | - reference to std::string to be returned to LibraryLink |
|
inline |
|
inline |
Set DataStore wrapped by ds as output MArgument.
| [in] | ds | - reference to generic DataStore which should pass its internal DataStore to LibraryLink |
|
inline |
Set MImage wrapped by im as output MArgument.
| [in] | im | - reference to generic Image which should pass its internal MImage to LibraryLink |
|
inline |
Set MNumericArray wrapped by na as output MArgument.
| [in] | na | - reference to generic NumericArray which should pass its internal MNumericArray to LibraryLink |
|
inline |
Set MSparseArray wrapped by t as output MArgument.
| [in] | t | - reference to generic SparseArray which should pass its internal MSparseArray to LibraryLink |
|
inline |
Set MTensor wrapped by t as output MArgument.
| [in] | t | - reference to generic Tensor which should pass its internal MTensor to LibraryLink |
|
inline |
|
inline |
Set MNumericArray wrapped by na as output MArgument.
| T | - NumericArray data type |
| [in] | na | - reference to NumericArray which should pass its internal MNumericArray to LibraryLink |
|
inline |
Set MSparseArray wrapped by sa as output MArgument.
| T | - SparseArray data type |
| [in] | sa | - reference to SparseArray which should pass its internal MSparseArray to LibraryLink |
|
inline |
Set str as output MArgument.
| [in] | str | - reference to std::string to be returned to LibraryLink |
|
inline |
Set given value as a result of the library function.
| T | - any type, for types not supported by default developers are encouraged to specialize this function template |
|
inline |
|
inlinenoexcept |
Set result as output MArgument.
| [in] | result | - value of type double to be returned to LibraryLink |
|
inlinenoexcept |
Set result as output MArgument.
| [in] | result | - value of type mint to be returned to LibraryLink |
result will be implicitly casted to mint with no overflow check
|
inlinenoexcept |
Set c as output MArgument.
| [in] | c | - value of type std::complex<double> to be returned to LibraryLink |
|
inline |
Set str as output MArgument.
| [in] | str | - reference to std::string to be returned to LibraryLink |
|
noexcept |
Set result as output MArgument.
| [in] | result | - boolean value to be returned to LibraryLink |
|
noexcept |
Set c as output MArgument.
| [in] | c | - value of type std::complex<double> to be returned to LibraryLink |
| void LLU::MArgumentManager::setDataList | ( | const DataList< T > & | ds | ) |
| void LLU::MArgumentManager::setDataStore | ( | DataStore | ds | ) |
Set DataStore as output MArgument.
| [in] | ds | - DataStore to be passed to LibraryLink |
| void LLU::MArgumentManager::setImage | ( | const Image< T > & | im | ) |
|
noexcept |
Set result as output MArgument.
| [in] | result | - value of type mint to be returned to LibraryLink |
result will be implicitly casted to mint with no overflow check | void LLU::MArgumentManager::setMImage | ( | MImage | im | ) |
Set MImage as output MArgument.
| [in] | im | - MImage to be passed to LibraryLink |
|
noexcept |
Set result as output MArgument and check for overflow.
| T | - integral type to be casted to mint |
| [in] | result | - value to be returned to LibraryLink |
| void LLU::MArgumentManager::setMNumericArray | ( | MNumericArray | na | ) |
Set MNumericArray as output MArgument.
| [in] | na | - MNumericArray to be passed to LibraryLink |
| void LLU::MArgumentManager::setMSparseArray | ( | MSparseArray | sa | ) |
Set MSparseArray as output MArgument.
| [in] | sa | - MSparseArray to be passed to LibraryLink |
| void LLU::MArgumentManager::setMTensor | ( | MTensor | t | ) |
Set MTensor as output MArgument.
| [in] | t | - MTensor to be passed to LibraryLink |
| void LLU::MArgumentManager::setNumericArray | ( | const NumericArray< T > & | na | ) |
Set MNumericArray wrapped by na as output MArgument.
| T | - NumericArray data type |
| [in] | na | - reference to NumericArray which should pass its internal MNumericArray to LibraryLink |
|
noexcept |
Set result as output MArgument.
| [in] | result | - value of type double to be returned to LibraryLink |
| void LLU::MArgumentManager::setSparseArray | ( | const SparseArray< T > & | sa | ) |
Set MSparseArray wrapped by sa as output MArgument.
| T | - SparseArray data type |
| [in] | sa | - reference to SparseArray which should pass its internal MSparseArray to LibraryLink |
| void LLU::MArgumentManager::setString | ( | const char * | str | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| void LLU::MArgumentManager::setString | ( | const std::string & | str | ) |
Set str as output MArgument.
| [in] | str | - reference to std::string to be returned to LibraryLink |
| void LLU::MArgumentManager::setString | ( | std::string && | str | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.