PIP 5.6.1
Platform-Independent Primitives
Public Member Functions | List of all members
PILuaProgram Class Reference

Helper object for loading scripts and exposing the embedded Lua state through LuaBridge. Provides interface for loading and executing Lua scripts using LuaBridge. More...

#include <piluaprogram.h>

Public Member Functions

 PILuaProgram ()
 Constructs a Lua program object and opens the standard Lua libraries.
 
bool load (const PIString &script)
 Loads and executes Lua source code from script.
 
bool prepare ()
 Calls lua_pcall() for the current Lua stack state.
 
luabridge::LuaRef getGlobal (const PIString &name)
 Returns a global Lua value by name.
 
luabridge::Namespace getGlobalNamespace ()
 Returns the LuaBridge namespace bound to the global Lua table.
 

Detailed Description

Helper object for loading scripts and exposing the embedded Lua state through LuaBridge. Provides interface for loading and executing Lua scripts using LuaBridge.