ug4
Loading...
Searching...
No Matches
lua_util.h File Reference
#include <vector>
#include <string>
#include "externals/lua/lua.h"
#include "externals/lua/lauxlib.h"
#include "externals/lua/lualib.h"
#include "common/common.h"
#include "common/util/path_provider.h"
#include "registry/registry.h"

Go to the source code of this file.

Classes

class  ug::script::LuaError
 Error class thrown if an error occurs during parsing. More...
 

Namespaces

namespace  ug
 the ug namespace
 
namespace  ug::script
 

Functions

UG_API bool ug::script::GetAbsoluteUGScriptFilename (const std::string &filename, std::string &absoluteFilename)
 
lua_Stateug::script::GetDefaultLuaState ()
 returns the default lua state
 
UG_API bool ug::script::LoadUGScript (const char *filename, bool bDistributed)
 loads and parses a file. Several paths are tried if the file is not found.
 
bool ug::script::LoadUGScript_Parallel (const char *filename)
 calls LoadUGScript with bDistributed=true
 
bool ug::script::LoadUGScript_Single (const char *filename)
 calls LoadUGScript with bDistributed=false . Avoid. (
 
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
 
void ug::script::RegisterStdLUAFunctions (lua_State *L)
 register functions like print and write directly to LUA (not using the ug registry)
 
void ug::script::ReleaseDefaultLuaState ()
 calls lua_close, which calls delete for all lua objects
 
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.
 
int ug::script::UGDimCompiled (lua_State *L)
 Returns if dimension is compiled into binary.
 
int ug::script::UGGetClassGroup (lua_State *L)
 Returns classgroup of a userdata as string.
 
int ug::script::UGGetClassName (lua_State *L)
 Returns type of a userdata as string.
 
int ug::script::UGGetMetatable (lua_State *L)
 Returns the metatable for the given class.
 
int ug::script::UGIsBaseClass (lua_State *L)
 Returns if a class contains a base class.
 
int ug::script::UGLuaPrint (lua_State *L)
 UGLuaPrint. Redirects LUA prints to UG_LOG.
 
int ug::script::UGLuaPrintAllProcs (lua_State *L)
 UGLuaPrint. Redirects LUA prints to UG_LOG.
 
int ug::script::UGLuaWrite (lua_State *L)
 UGLuaWrite. Redirects LUA prints to UG_LOG without adding newline at the end.