PIP 5.9.0
Platform-Independent Primitives
Loading...
Searching...
No Matches
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.
 ~PILuaProgram ()
 Closes the Lua state and releases all associated resources.
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.