nngn
Loading...
Searching...
No Matches
nngn::lua::table Struct Reference

Owning reference to a table on the stack, popped when destroyed. More...

#include <table.h>

Inheritance diagram for nngn::lua::table:
Collaboration diagram for nngn::lua::table:

Public Member Functions

 table (const table &)=delete
 
tableoperator= (const table &)=delete
 
 table (table &&) noexcept=default
 
tableoperator= (table &&) noexcept=default
 
 ~table (void)=default
 
table_view release (void)
 Disowns the current reference and returns a non-owning view to it.
 
 value (const value &)=delete
 
 value (value_view v)
 
 value (value &&rhs) noexcept
 
- Public Member Functions inherited from nngn::lua::value
 value (const value &)=delete
 
valueoperator= (const value &)=delete
 
 value (value_view v)
 
 value (value &&rhs) noexcept
 
valueoperator= (value &&rhs) noexcept
 
 ~value (void)
 
value_view release (void)
 
template<typename R = value>
push (void) const
 
value remove (void)
 
 value_view ()=default
 
 value_view (const value_view &)=default
 
 value_view (value_view &&) noexcept=default
 
 value_view (lua_State *L, int i)
 
 value_view (state_view l, int i)
 
- Public Member Functions inherited from nngn::lua::value_view
 value_view ()=default
 
 value_view (const value_view &)=default
 
value_viewoperator= (const value_view &)=default
 
 value_view (value_view &&) noexcept=default
 
value_viewoperator= (value_view &&) noexcept=default
 
 value_view (lua_State *L, int i)
 
 value_view (state_view l, int i)
 
 ~value_view (void)=default
 
state_view state (void) const
 
state_view release (void)
 
int index (void) const
 Lua stack index.
 
type get_type (void) const
 Type of value at index i.
 
bool is_nil (void) const
 
auto to_string (void) const
 
void get (lua_State *L, int i)
 
template<typename T >
requires (detail::can_get<T>)
T get (void) const
 
int push (void) const
 
template<typename R = value_view>
push (void) const
 
template<typename T >
 operator T (void) const
 
- Public Member Functions inherited from nngn::lua::detail::table_base< table >
table_proxy< table, std::decay_t< K > > operator[] (K &&k) const
 
lua_Integer size (void) const
 
table_iter< const tablebegin (void) const
 lua_next-based iteration.
 
table_iter< const tableend (void) const
 Sentinel for begin.
 
table_seq_iter< const tableibegin (void) const
 ipairs-style iteration.
 
table_seq_iter< const tableiend (void) const
 Sentinel for ibegin.
 
T raw_get (auto &&k, T &&def=T{}) const
 Gets field without meta methods.
 
T get_field (auto &&k, T &&def=T{}) const
 Gets field, with optional default value.
 
void raw_set (auto &&k, auto &&v) const
 Sets a table field without meta methods.
 
void set (auto &&k, auto &&v) const
 Sets a table field.
 
void set (std::tuple< Ts... > &&t) const
 Sets multiple table fields.
 

Additional Inherited Members

- Protected Member Functions inherited from nngn::lua::detail::table_base< table >
T get_common (auto &&k, T &&def=T{}) const
 
void set_common (auto &&k, auto &&v) const
 

Detailed Description

Owning reference to a table on the stack, popped when destroyed.

Constructor & Destructor Documentation

◆ table() [1/2]

nngn::lua::table::table ( const table & )
delete

◆ table() [2/2]

nngn::lua::table::table ( table && )
defaultnoexcept

◆ ~table()

nngn::lua::table::~table ( void )
default

Member Function Documentation

◆ operator=() [1/2]

table & nngn::lua::table::operator= ( const table & )
delete

◆ operator=() [2/2]

table & nngn::lua::table::operator= ( table && )
defaultnoexcept

◆ release()

table_view nngn::lua::table::release ( void )
inline

Disowns the current reference and returns a non-owning view to it.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ value() [1/3]

nngn::lua::value::value ( const value & )
delete

◆ value() [2/3]

nngn::lua::value::value ( value && rhs)
inlinenoexcept

◆ value() [3/3]

nngn::lua::value::value ( value_view v)
inline

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