Luwra
Minimal-overhead Lua wrapper for C++
|
Lifecycle of a reference. More...
#include <reference.hpp>
Public Member Functions | |
void | push () const |
Push the value inside the reference cell onto the originating Lua stack. | |
void | push (State *target) const |
Push the value inside the reference cell onto the given Lua stack. | |
RefLifecycle (const RefLifecycle &other) | |
Create a reference using an existing one. The lifecycles of these references are independent. | |
RefLifecycle (RefLifecycle &&other) | |
Take over an existing reference. The given reference's lifecycle is terminated. | |
RefLifecycle (State *state) | |
Create a reference using the value on top of the stack. Consumes the value. | |
RefLifecycle (State *state, int index) | |
Create a reference to a value on the stack. Does not consume the value. | |
~RefLifecycle () | |
Public Attributes | |
int | ref |
Reference identification. | |
State * | state |
State with the reference registry. | |
Lifecycle of a reference.
|
inline |
Create a reference using the value on top of the stack. Consumes the value.
|
inline |
Create a reference to a value on the stack. Does not consume the value.
|
inline |
Create a reference using an existing one. The lifecycles of these references are independent.
|
inline |
Take over an existing reference. The given reference's lifecycle is terminated.
|
inline |
|
inline |
Push the value inside the reference cell onto the originating Lua stack.
|
inline |
Push the value inside the reference cell onto the given Lua stack.
int luwra::RefLifecycle::ref |
Reference identification.
State* luwra::RefLifecycle::state |
State with the reference registry.