Geogram  Version 1.9.1-rc
A programming library of geometric algorithms
GEO::lua_wrapper< FPTR > Class Template Reference

Manages wrappers around C++ functions to be called from LUA. More...

#include <geogram/lua/lua_wrap.h>

Static Public Member Functions

static int call (lua_State *L)
 Implementation of the wrapper. More...
 
static void push (lua_State *L, FPTR f)
 Pushes a wrapper for a given C++ function onto the LUA stack. More...
 

Detailed Description

template<class FPTR>
class GEO::lua_wrapper< FPTR >

Manages wrappers around C++ functions to be called from LUA.

This class should not be used directly by client code. Client code will rather use the high-level macro lua_bindwrapper() or the lower-level functions lua_bindwrapperwithname() and lua_pushwrapper().

Definition at line 1224 of file lua_wrap.h.

Member Function Documentation

◆ call()

template<class FPTR >
static int GEO::lua_wrapper< FPTR >::call ( lua_State *  L)
inlinestatic

Implementation of the wrapper.

This is the C functions to be declared to LUA. It is typed by the signature of the wrapped C++ function, and the pointer to the actual wrapped C++ function is stored in an upvalue.

Parameters
[in]La pointer to the LUA state.

Definition at line 1235 of file lua_wrap.h.

◆ push()

template<class FPTR >
static void GEO::lua_wrapper< FPTR >::push ( lua_State *  L,
FPTR  f 
)
inlinestatic

Pushes a wrapper for a given C++ function onto the LUA stack.

Parameters
[in]La pointer to the LUA state.
[in]fa pointer to the C++ function to be pushed. It cannot be a non-static object's member function.

Definition at line 1250 of file lua_wrap.h.


The documentation for this class was generated from the following file: