LuaVar

Implements a Lua variable with all the underlying stuff required for it.

Constructors

this
this(T val)

Initializes the value with the type of val

this
this(lua_State* state, int idx)

Fetches the given index (idx) from the lua_State (state), and initializes a LuaVar based on its type.

Members

Functions

get
T get()

Returns the given type of T.

opAssign
auto opAssign(T val)

Assigns the value to this struct and sets the type if needed.

opCast
T opCast()

Casts the type to T if possible.

opEquals
bool opEquals(LuaVar other)

used to implement an interface with tables in Lua.

pushToLuaState
void pushToLuaState(lua_State* state)

Pushes the struct's value to the given lua_State.

type
LuaVarType type()

Returns the type held by this stucture.

Static functions

voidType
LuaVar voidType()

Creates a Lua variable of type void.

Meta