ug4
bindings_lua.cpp File Reference
#include <sstream>
#include <cstring>
#include <cstdlib>
#include <queue>
#include "bindings_lua.h"
#include "registry/registry.h"
#include "registry/class_helper.h"
#include "common/common.h"
#include "info_commands.h"
#include "lua_util.h"
#include "lua_parsing.h"
#include "pcl/pcl_base.h"
#include "bridge/bridge.h"
#include "common/util/stringify.h"
#include "lua_stack.h"

Namespaces

 ug
 the ug namespace
 
 ug::bridge
 
 ug::bridge::lua
 

Macros

#define UG_LUA_BINDINGS_CATCH(msg, args)
 
#define UG_LUA_BINDINGS_THROW(L)
 
#define UG_LUA_THROW(luaState, msg)   luaL_error(luaState, "\n%s", msg)
 
#define UG_LUA_THROW_EMPTY(luaState)   luaL_error(luaState, "%s", "__UG__LUA__EMPTY__MSG__")
 throw mechanism for lua related errors. More...
 

Functions

bool ug::bridge::lua::CreateBindings_LUA (lua_State *L, Registry &reg)
 creates bindings for ug_interface and a given lua-state. More...
 
static int ug::bridge::lua::ExecuteMethod (lua_State *L, const ExportedMethodGroup *methodGrp, UserDataWrapper *self, const ClassNameNode *classNameNode, bool errorOutput)
 
void ug::bridge::lua::GetBestMatchingMember (const char *classname, const char *name, std::string &minname, int &mind)
 
void ug::bridge::lua::GetBestMatchingMember (const IExportedClass *c, const char *name, std::string &minname, int &mind)
 
std::string ug::bridge::lua::GetColonWarning (std::string name)
 
static string ug::bridge::lua::GetLuaParametersString (lua_State *L, int offsetToFirstParam=0)
 returns a String describing the parameters on the lua stack ex. "GlobalMultiGridRefiner*, LuaUserNumber2d*, number, string" More...
 
string ug::bridge::lua::GetNilWarning (lua_State *L, int offsetToFirstParam)
 
static string ug::bridge::lua::GetTypeMismatchString (const ParameterInfo &paramsTemplate, lua_State *L, int offsetToFirstParam, int badParamOneBased)
 
static int ug::bridge::lua::LuaConstructor (lua_State *L, IExportedClass *c, const char *groupname=nullptr)
 
static int ug::bridge::lua::LuaProxyConstructor (lua_State *L)
 
static int ug::bridge::lua::LuaProxyDelete (lua_State *L)
 
static int ug::bridge::lua::LuaProxyFunction (lua_State *L)
 
static int ug::bridge::lua::LuaProxyGroupConstructor (lua_State *L)
 
static int ug::bridge::lua::LuaProxyMethod (lua_State *L)
 
static int ug::bridge::lua::LuaProxyRelease (lua_State *L)
 
static int ug::bridge::lua::LuaToStringDefault (lua_State *L)
 
static int ug::bridge::lua::MetatableIndexer (lua_State *L)
 
std::string ug::bridge::lua::ParameterStackString (ParameterStack &s)
 
void ug::bridge::lua::PrintLUACallStack ()
 
string ug::bridge::lua::UGErrorTraceback (UGError &err)
 
ConstSmartUserDataWrapper * ug::bridge::lua::CreateNewUserData (lua_State *L, const ConstSmartPtr< void > &ptr, const char *metatableName)
 creates a new UserDataWrapper and associates it with ptr in luas registry More...
 
SmartUserDataWrapper * ug::bridge::lua::CreateNewUserData (lua_State *L, const SmartPtr< void > &ptr, const char *metatableName)
 creates a new UserDataWrapper and associates it with ptr in luas registry More...
 
RawUserDataWrapper * ug::bridge::lua::CreateNewUserData (lua_State *L, void *ptr, const char *metatableName, void(*deleteFunc)(const void *), bool is_const)
 creates a new UserDataWrapper and associates it with ptr in luas registry More...
 

Variables

static const char * errSymb = " % "
 
const bool ug::bridge::lua::IMLPICIT_SMART_PTR_TO_PTR_CONVERSION = true
 

Macro Definition Documentation

◆ UG_LUA_BINDINGS_CATCH

#define UG_LUA_BINDINGS_CATCH (   msg,
  args 
)

◆ UG_LUA_BINDINGS_THROW

#define UG_LUA_BINDINGS_THROW (   L)
Value:
UG_LUA_THROW_EMPTY(L);
void ug_throw_error()
called whenever UG_THROW or UG_THROW_REGISTRY_ERROR is called.
Definition: assert.cpp:164

◆ UG_LUA_THROW

#define UG_LUA_THROW (   luaState,
  msg 
)    luaL_error(luaState, "\n%s", msg)

◆ UG_LUA_THROW_EMPTY

#define UG_LUA_THROW_EMPTY (   luaState)    luaL_error(luaState, "%s", "__UG__LUA__EMPTY__MSG__")

throw mechanism for lua related errors.

Variable Documentation

◆ errSymb