LibraryLink Utilities  3.0.1
Modern C++ wrapper over LibraryLink and WSTP
LLU::LibraryData Struct Reference

Description

This structure offers a static copy of WolframLibData accessible throughout the whole life of the DLL.

#include <LibraryData.h>

Static Public Member Functions

static void setLibraryData (WolframLibraryData ld)
 Set WolframLibraryData structure as static member of LibDataHolder. More...
 
static bool hasLibraryData ()
 Check if libData is populated. More...
 
static WolframLibraryData API ()
 Get currently owned WolframLibraryData, if any. More...
 
static const st_WolframNumericArrayLibrary_Functions * NumericArrayAPI ()
 Get a pointer to structure with function pointers to MNumericArray API. More...
 
static const st_WolframSparseLibrary_Functions * SparseArrayAPI ()
 Get a pointer to structure with function pointers to MSparseArray API. More...
 
static const st_WolframImageLibrary_Functions * ImageAPI ()
 Get a pointer to structure with function pointers to MImage API. More...
 
static const st_WolframIOLibrary_Functions * DataStoreAPI ()
 Get a pointer to structure with function pointers to DataStore API. More...
 
static WolframLibraryData uncheckedAPI () noexcept
 Get currently owned WolframLibraryData, even if it is a nullptr. More...
 

Member Function Documentation

◆ API()

WolframLibraryData LLU::LibraryData::API ( )
static

Get currently owned WolframLibraryData, if any.

Returns
a non-owning pointer to current instance of st_WolframLibraryData statically stored by LibraryData
Exceptions
ErrorName::LibDataError- if libData is nullptr

◆ DataStoreAPI()

const st_WolframIOLibrary_Functions * LLU::LibraryData::DataStoreAPI ( )
static

Get a pointer to structure with function pointers to DataStore API.

Returns
a pointer to raw LibraryLink DataStore API

◆ hasLibraryData()

bool LLU::LibraryData::hasLibraryData ( )
static

Check if libData is populated.

Returns
true iff the libData is not a nullptr

◆ ImageAPI()

const st_WolframImageLibrary_Functions * LLU::LibraryData::ImageAPI ( )
static

Get a pointer to structure with function pointers to MImage API.

Returns
a pointer to raw LibraryLink MImage API

◆ NumericArrayAPI()

const st_WolframNumericArrayLibrary_Functions * LLU::LibraryData::NumericArrayAPI ( )
static

Get a pointer to structure with function pointers to MNumericArray API.

Returns
a pointer to raw LibraryLink MNumericArray API

◆ setLibraryData()

void LLU::LibraryData::setLibraryData ( WolframLibraryData  ld)
static

Set WolframLibraryData structure as static member of LibDataHolder.

Call this function in WolframLibrary_initialize.

Parameters
[in]ld- WolframLibraryData passed to every library function via LibraryLink
Warning
This function must be called before constructing the first MArgumentManager unless you use a constructor that takes WolframLibraryData as argument

◆ SparseArrayAPI()

const st_WolframSparseLibrary_Functions * LLU::LibraryData::SparseArrayAPI ( )
static

Get a pointer to structure with function pointers to MSparseArray API.

Returns
a pointer to raw LibraryLink MSparseArray API

◆ uncheckedAPI()

WolframLibraryData LLU::LibraryData::uncheckedAPI ( )
staticnoexcept

Get currently owned WolframLibraryData, even if it is a nullptr.

Returns
raw pointer to st_WolframLibraryData statically stored by LibraryData