Go to the documentation of this file.
25 State(lua_State *L,
bool shouldClose =
false);
44 void dofile(std::string filepath);
77 void push(std::string str);
85 void registerClosure(
void *ptr, std::string funcName, lua_CFunction fn);
State & operator=(const State &)=delete
No assign operator.
void popLast(void)
Pop last value on the stack.
Definition: LuaGate.cpp:119
void registerClosure(void *ptr, std::string funcName, lua_CFunction fn)
Definition: LuaGate.cpp:124
lua_State * getState(void)
Get Lua state.
Definition: LuaGate.cpp:26
bool getReturnBool(void)
Get return Number.
Definition: LuaGate.cpp:60
lua_State * _state
Lua state.
Definition: LuaGate.hpp:16
void push(float val)
push a number onto the lua stack
Definition: LuaGate.cpp:104
float getReturnNumber(void)
Get return Number.
Definition: LuaGate.cpp:46
~State()
dtor
Definition: LuaGate.cpp:20
void setTable(void)
setTable
Definition: LuaGate.cpp:99
Definition: LuaGate.hpp:12
void newTable(void)
Creates a new table at the top of the stack.
Definition: LuaGate.cpp:114
Definition: LuaGate.cpp:7
bool getBool(int index)
Get bool at index in the stack.
Definition: LuaGate.cpp:73
int getFirstUpValueIdx(void)
Get first upvalue index.
Definition: LuaGate.cpp:88
State()
ctor
Definition: LuaGate.cpp:9
const void * getPointer(int index)
Get Number at index in the stack.
Definition: LuaGate.cpp:83
float getNumber(int index)
Get Number at index in the stack.
Definition: LuaGate.cpp:78
bool callFunction(int nbParams, int nbReturns)
call a lua function
Definition: LuaGate.cpp:93
bool _shouldClose
Should close the state at destruction.
Definition: LuaGate.hpp:19
void dostring(std::string str)
Execute a string in this state.
Definition: LuaGate.cpp:41
void dofile(std::string filepath)
Execute a file in this state.
Definition: LuaGate.cpp:36
void getGlobal(std::string str)
Get global value on top of the stack.
Definition: LuaGate.cpp:31