nngn
Loading...
Searching...
No Matches
nngn::lua::global_table Class Reference

Table interface to the global environment. More...

#include <table.h>

Inheritance diagram for nngn::lua::global_table:
Collaboration diagram for nngn::lua::global_table:

Public Member Functions

 global_table (state_view lua)
 
 ~global_table (void)=default
 
state_view state (void) const
 
int push (void) const
 
 global_table (state_view lua)
 
 ~global_table (void)=default
 
state_view state (void) const
 
int push (void) const
 
- Public Member Functions inherited from nngn::lua::detail::table_base< global_table >
table_proxy< global_table, std::decay_t< K > > operator[] (K &&k) const
 
table_proxy< global_table, std::decay_t< K > > operator[] (K &&k) const
 
lua_Integer size (void) const
 
lua_Integer size (void) const
 
table_iter< const global_tablebegin (void) const
 lua_next-based iteration.
 
table_iter< const global_tablebegin (void) const
 lua_next-based iteration.
 
table_iter< const global_tableend (void) const
 Sentinel for begin.
 
table_iter< const global_tableend (void) const
 Sentinel for begin.
 
table_seq_iter< const global_tableibegin (void) const
 ipairs-style iteration.
 
table_seq_iter< const global_tableibegin (void) const
 ipairs-style iteration.
 
table_seq_iter< const global_tableiend (void) const
 Sentinel for ibegin.
 
table_seq_iter< const global_tableiend (void) const
 Sentinel for ibegin.
 
T raw_get (auto &&k, T &&def=T{}) const
 Gets field without meta methods.
 
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.
 
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 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.
 
void set (auto &&k, auto &&v) const
 Sets a table field.
 
void set (std::tuple< Ts... > &&t) const
 Sets multiple table fields.
 

Private Member Functions

int begin_op (void) const
 
void end_op (int i) const
 
int begin_op (void) const
 
void end_op (int i) const
 

Private Attributes

state_view m_state = {}
 

Additional Inherited Members

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

Detailed Description

Table interface to the global environment.

Constructor & Destructor Documentation

◆ global_table() [1/2]

nngn::lua::global_table::global_table ( state_view  lua)
inlineexplicit

◆ ~global_table() [1/2]

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

◆ global_table() [2/2]

nngn::lua::global_table::global_table ( state_view  lua)
inlineexplicit

◆ ~global_table() [2/2]

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

Member Function Documentation

◆ begin_op() [1/2]

int nngn::lua::global_table::begin_op ( void  ) const
inlineprivate
Here is the call graph for this function:

◆ begin_op() [2/2]

int nngn::lua::global_table::begin_op ( void  ) const
inlineprivate
Here is the call graph for this function:

◆ end_op() [1/2]

void nngn::lua::global_table::end_op ( int  i) const
inlineprivate
Here is the call graph for this function:

◆ end_op() [2/2]

void nngn::lua::global_table::end_op ( int  i) const
inlineprivate
Here is the call graph for this function:

◆ push() [1/2]

int nngn::lua::global_table::push ( void  ) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ push() [2/2]

int nngn::lua::global_table::push ( void  ) const
inline
Here is the call graph for this function:

◆ state() [1/2]

state_view nngn::lua::global_table::state ( void  ) const
inline
Here is the caller graph for this function:

◆ state() [2/2]

state_view nngn::lua::global_table::state ( void  ) const
inline

Member Data Documentation

◆ m_state

state_view nngn::lua::global_table::m_state = {}
private

The documentation for this class was generated from the following files: