LibraryLink Utilities  3.0.1
Modern C++ wrapper over LibraryLink and WSTP
ManagedExpression.hpp File Reference

Definition of the ManagedExpressionStore class template which provides C++ API for the Managed Expressions from LibraryLink. More...

Detailed Description

Definition of the ManagedExpressionStore class template which provides C++ API for the Managed Expressions from LibraryLink.

Author
Rafal Chojna rafal.nosp@m.c@wo.nosp@m.lfram.nosp@m..com
Date
July 17, 2019
#include <memory>
#include <unordered_map>
#include <utility>
#include "LLU/LibraryData.h"
#include "LLU/Utilities.hpp"
+ Include dependency graph for ManagedExpression.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  LLU::ManagedExpressionStore< T >
 ManagedExpressionStore will keep track of instances of managed class T and will provide safe access to them. More...
 

Namespaces

 LLU
 Main namespace of LibraryLink Utilities.
 

Macros

#define DEFINE_MANAGED_STORE_AND_SPECIALIZATION(ClassName)
 Use this macro to define an instance of ManagedExpressionStore corresponding to your class and a template specialization of manageInstanceCallback for the managed class. More...
 

Functions

template<class T >
void LLU::manageInstanceCallback (WolframLibraryData, mbool, mint)
 A template for library callback used by LibraryLink to manage instances of ManagedLibraryExpressions. More...
 

Macro Definition Documentation

◆ DEFINE_MANAGED_STORE_AND_SPECIALIZATION

#define DEFINE_MANAGED_STORE_AND_SPECIALIZATION (   ClassName)
Value:
\
template<> \
inline void LLU::manageInstanceCallback<ClassName>(WolframLibraryData, mbool mode, mint id) { \
ClassName##Store.manageInstance(mode, id); \
}

Use this macro to define an instance of ManagedExpressionStore corresponding to your class and a template specialization of manageInstanceCallback for the managed class.

LLU::ManagedExpressionStore::manageInstance
void manageInstance(mbool mode, mint id)
Function that will actually be called by LibraryLink when an instance of Managed Expression is create...
Definition: ManagedExpression.hpp:69
LLU::ManagedExpressionStore
ManagedExpressionStore will keep track of instances of managed class T and will provide safe access t...
Definition: ManagedExpression.hpp:50