|
| state (const state &)=delete |
|
state & | operator= (const state &)=delete |
|
| state (void)=default |
| Empty state, must call init before any other function is called.
|
|
| state (lua_State *L_) |
| Takes ownership of an existing luaState .
|
|
| state (state &&rhs) noexcept |
| Transfers the lua_State from another object.
|
|
state & | operator= (state &&rhs) noexcept |
| Transfers the lua_State from another object.
|
|
| ~state (void) |
| Destroys the associated lua_State .
|
|
| state_view (void)=default |
| Empty state, must call init before any other function is called.
|
|
| state_view (lua_State *L_) |
| Wraps an existing luaState .
|
|
| operator lua_State * (void) const |
| Implicit conversion so the state can be passed to Lua functions.
|
|
bool | init (alloc_info *i=nullptr) |
| Initializes a new state.
|
|
state_view | release (void) |
|
void | destroy (void) |
| Destroys the associated lua_State .
|
|
int | top (void) const |
|
type | get_type (int i) const |
|
template<typename T = lua_Integer> |
T | len (int i) const |
|
std::pair< lua_Alloc, void * > | allocator (void) const |
| Get memory allocator data.
|
|
global_table | globals (void) const |
|
void | set_top (int i) const |
|
void | set_meta_table (auto &&mt, int i) |
|
void | print_stack (void) const |
| Non-static version.
|
|
void | print_traceback (void) const |
| Non-static version.
|
|
bool | doarg (std::string_view s) const |
| Calls dofile or dostring depending on s[0] == '@' .
|
|
bool | dofile (std::string_view filename) const |
|
bool | dostring (std::string_view src) const |
|
bool | dofunction (std::string_view f) const |
| Executes the global function f .
|
|
template<typename T > |
T * | new_user_data (int nv=0) const |
|
template<typename T > |
table | new_user_type (void) const |
| Registers a new user type and returns its meta table.
|
|
table | create_table (void) const |
| Creates a table and pushes it on the stack.
|
|
table | create_table (int narr, int nrec) const |
| Creates a table and pushes it on the stack.
|
|
template<typename T = value_view> |
T | get (int i) const |
| Reads a value from the stack.
|
|
template<typename T = value_view> |
T | push (auto &&x) const |
| Pushes a value onto the stack.
|
|
void | pop (int n=1) const |
|
void | remove (int i) const |
|
void | call (auto &&f, auto &&...args) const |
| Function call, protected in debug mode.
|
|
int | pcall (auto &&h, auto &&f, auto &&...args) const |
| Protected function call with error handler.
|
|
std::pair< value, std::string_view > | to_string (int i) const |
| Pushes a string representation of a value onto the stack.
|
|
bool | heartbeat (void) const |
| Execute the global heartbeat function.
|
|
Owning lua_State
wrapper.