SimpleFastOpenAtomicVisualiser
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
LuaTable< LUA_TYPE > Struct Template Reference

Interop for a single-type Lua table. More...

#include <LuaTable.h>

Public Member Functions

 LuaTable ()
 Construct an default table.
 
void read (lua_State *lua, int index)
 Read the table from stack index index.
 
bool readField (lua_State *lua, const char *name)
 Read the table from a table field.
 
bool readGlobal (lua_State *lua, const char *name)
 Read the table from a global table field.
 
size_t size () const
 
LUA_TYPEoperator[] (size_t i)
 
 operator std::vector< LUA_TYPE > ()
 

Public Attributes

std::vector< LUA_TYPEdata
 

Detailed Description

template<class LUA_TYPE>
struct LuaTable< LUA_TYPE >

Interop for a single-type Lua table.

Template Parameters
LUA_TYPEthe Lua type (which may be LuaTable).

Constructor & Destructor Documentation

◆ LuaTable()

template<class LUA_TYPE >
LuaTable< LUA_TYPE >::LuaTable ( )
inline

Construct an default table.

Member Function Documentation

◆ operator std::vector< LUA_TYPE >()

template<class LUA_TYPE >
LuaTable< LUA_TYPE >::operator std::vector< LUA_TYPE > ( )
inline

◆ operator[]()

template<class LUA_TYPE >
LUA_TYPE & LuaTable< LUA_TYPE >::operator[] ( size_t  i)
inline

◆ read()

template<class LUA_TYPE >
void LuaTable< LUA_TYPE >::read ( lua_State lua,
int  index 
)
inline

Read the table from stack index index.

Parameters
luathe Lua context.
indexthe stack index.

◆ readField()

template<class LUA_TYPE >
bool LuaTable< LUA_TYPE >::readField ( lua_State lua,
const char name 
)
inline

Read the table from a table field.

Parameters
luathe Lua context.
namethe field name.
Returns
true succesful read.
false unsuccesful read.

◆ readGlobal()

template<class LUA_TYPE >
bool LuaTable< LUA_TYPE >::readGlobal ( lua_State lua,
const char name 
)
inline

Read the table from a global table field.

Parameters
luathe Lua context.
namethe field name.
Returns
true succesful read.
false unsuccesful read.

◆ size()

template<class LUA_TYPE >
size_t LuaTable< LUA_TYPE >::size ( ) const
inline

Member Data Documentation

◆ data

template<class LUA_TYPE >
std::vector<LUA_TYPE> LuaTable< LUA_TYPE >::data

The documentation for this struct was generated from the following file: