LibraryLink Utilities  3.0.1
Modern C++ wrapper over LibraryLink and WSTP
LLU::MArgumentManager::Getter< T > Struct Template Reference

Description

template<typename T>
struct LLU::MArgumentManager::Getter< T >

Helper structure to fully customize the way MArgumentManager reads T as argument type.

If T is a user-defined argument type, LLU will by default attempt to create an object of type T by reading values of corresponding types and feeding it to a constructor of T. Specialize Getter<> to override this behavior.

Note
Every user-defined argument type must specialize CustomType<>, specializing Getter<> is optional.
Template Parameters
T- any type, for which you would like full control over how MArgumentManager reads arguments of that type

#include <MArgumentManager.h>

Static Public Member Functions

static T get (const MArgumentManager &mngr, size_type firstIndex)
 A function that tells LLU how to interpret an object of a user-defined type as an argument of a library function This function is used internally by MArgumentManager::get. More...
 

Member Function Documentation

◆ get()

template<typename T >
static T LLU::MArgumentManager::Getter< T >::get ( const MArgumentManager mngr,
size_type  firstIndex 
)
inlinestatic

A function that tells LLU how to interpret an object of a user-defined type as an argument of a library function This function is used internally by MArgumentManager::get.

Parameters
mngr- an instance of MArgumentManager
firstIndex- index of the first library function parameter to be used
Returns
an object of type T constructed from library function arguments stored in mngr