ug4
lua_util.cpp File Reference
#include <cassert>
#include <cstring>
#include <string>
#include <stack>
#include "ug.h"
#include "lua_util.h"
#include "common/util/path_provider.h"
#include "common/util/file_util.h"
#include "bindings_lua.h"
#include "bridge/bridge.h"
#include "registry/class_helper.h"
#include "info_commands.h"
#include "registry/class_name_provider.h"
#include "registry/registry.h"
#include "lua_debug.h"
#include "lua_stack.h"
#include "common/util/binary_buffer.h"
#include "pcl/pcl.h"
#include "pcl/pcl_util.h"

Namespaces

 ug
 the ug namespace
 
 ug::script
 

Macros

#define PL_COULDNT_FIND   -2
 
#define PL_COULDNT_READ   -1
 

Functions

bool ug::script::GetAbsoluteUGScriptFilename (const string &filename, string &absoluteFilename)
 
std::string ug::script::GetAbsoluteUGScriptFilenamePaths ()
 
lua_Stateug::script::GetDefaultLuaState ()
 returns the default lua state More...
 
bool ug::script::GetNormalFilename (const string &filename, string &returnedFilename)
 
static void ug::script::GetToStringFromStack (lua_State *L, std::stringstream &ss)
 
bool ug::script::LoadUGScript (const char *_filename, bool bDistributedLoad, bool bThrowOnError)
 
bool ug::script::LoadUGScript_Parallel (const char *filename)
 calls LoadUGScript with bDistributed=true More...
 
bool ug::script::LoadUGScript_Single (const char *filename)
 calls LoadUGScript with bDistributed=false . Avoid. ( More...
 
int ug::script::luaCallStackError (lua_State *L)
 error function to be used for lua_pcall More...
 
bool ug::script::ParseAndExecuteBuffer (const char *buffer, const char *bufferName)
 
void ug::script::RegisterDefaultLuaBridge (ug::bridge::Registry *reg, std::string grp="/ug4")
 registers lua only functionality at the registry More...
 
void ug::script::RegisterStdLUAFunctions (lua_State *L)
 register functions like print and write directly to LUA (not using the ug registry) More...
 
void ug::script::ReleaseDefaultLuaState ()
 calls lua_close, which calls delete for all lua objects More...
 
void ug::script::SetLuaUGArgs (lua_State *L, int argc, char *argv[])
 
int ug::script::UGAlgebraCompiled (lua_State *L)
 Returns if dimension is compiled into binary. More...
 
int ug::script::UGDimCompiled (lua_State *L)
 Returns if dimension is compiled into binary. More...
 
int ug::script::UGGetClassGroup (lua_State *L)
 Returns classgroup of a userdata as string. More...
 
int ug::script::UGGetClassName (lua_State *L)
 Returns type of a userdata as string. More...
 
int ug::script::UGGetMetatable (lua_State *L)
 Returns the metatable for the given class. More...
 
int ug::script::UGIsBaseClass (lua_State *L)
 Returns if a class contains a base class. More...
 
int ug::script::UGLuaErrLog (lua_State *L)
 UGLuaErrLog. More...
 
int ug::script::UGLuaPrint (lua_State *L)
 UGLuaPrint. Redirects LUA prints to UG_LOG. More...
 
int ug::script::UGLuaPrintAllProcs (lua_State *L)
 UGLuaPrint. Redirects LUA prints to UG_LOG. More...
 
int ug::script::UGLuaWrite (lua_State *L)
 UGLuaWrite. Redirects LUA prints to UG_LOG without adding newline at the end. More...
 
static void ug::script::UpdateScriptAfterRegistryChange (ug::bridge::Registry *pReg)
 

Variables

static ug::bridge::Registryug::script::g_pRegistry = NULL
 
static lua_Stateug::script::theLuaState = NULL
 

Macro Definition Documentation

◆ PL_COULDNT_FIND

#define PL_COULDNT_FIND   -2

◆ PL_COULDNT_READ

#define PL_COULDNT_READ   -1