nngn
Loading...
Searching...
No Matches
nngn::lua::detail::table_base< CRTP > Class Template Reference

CRTP base for stack table types. More...

#include <table.h>

Inheritance diagram for nngn::lua::detail::table_base< CRTP >:
Collaboration diagram for nngn::lua::detail::table_base< CRTP >:

Public Member Functions

template<typename K >
table_proxy< CRTP, std::decay_t< K > > operator[] (K &&k) const
 
lua_Integer size (void) const
 
table_iter< const CRTP > begin (void) const
 lua_next-based iteration.
 
table_iter< const CRTP > end (void) const
 Sentinel for begin.
 
table_seq_iter< const CRTP > ibegin (void) const
 ipairs-style iteration.
 
table_seq_iter< const CRTP > iend (void) const
 Sentinel for ibegin.
 
template<typename T >
T raw_get (auto &&k, T &&def=T{}) const
 Gets field without meta methods.
 
template<typename T >
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.
 
template<typename ... Ts>
void set (std::tuple< Ts... > &&t) const
 Sets multiple table fields.
 
template<typename K >
table_proxy< CRTP, std::decay_t< K > > operator[] (K &&k) const
 
lua_Integer size (void) const
 
table_iter< const CRTP > begin (void) const
 lua_next-based iteration.
 
table_iter< const CRTP > end (void) const
 Sentinel for begin.
 
table_seq_iter< const CRTP > ibegin (void) const
 ipairs-style iteration.
 
table_seq_iter< const CRTP > iend (void) const
 Sentinel for ibegin.
 
template<typename T >
T raw_get (auto &&k, T &&def=T{}) const
 Gets field without meta methods.
 
template<typename T >
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.
 
template<typename ... Ts>
void set (std::tuple< Ts... > &&t) const
 Sets multiple table fields.
 

Protected Member Functions

template<op_mode mode, typename T >
T get_common (auto &&k, T &&def=T{}) const
 
template<op_mode mode>
void set_common (auto &&k, auto &&v) const
 
template<op_mode mode, typename T >
T get_common (auto &&k, T &&def=T{}) const
 
template<op_mode mode>
void set_common (auto &&k, auto &&v) const
 

Private Member Functions

const CRTP & crtp (void) const
 
int begin_op (void) const
 
void end_op (int) const
 
const CRTP & crtp (void) const
 
int begin_op (void) const
 
void end_op (int) const
 

Detailed Description

template<typename CRTP>
class nngn::lua::detail::table_base< CRTP >

CRTP base for stack table types.

Member Function Documentation

◆ begin() [1/2]

template<typename CRTP >
table_iter< const CRTP > nngn::lua::detail::table_base< CRTP >::begin ( void  ) const

lua_next-based iteration.

◆ begin() [2/2]

template<typename CRTP >
table_iter< const CRTP > nngn::lua::detail::table_base< CRTP >::begin ( void  ) const

lua_next-based iteration.

◆ begin_op() [1/2]

template<typename CRTP >
int nngn::lua::detail::table_base< CRTP >::begin_op ( void  ) const
inlineprivate
Here is the call graph for this function:

◆ begin_op() [2/2]

template<typename CRTP >
int nngn::lua::detail::table_base< CRTP >::begin_op ( void  ) const
inlineprivate
Here is the call graph for this function:

◆ crtp() [1/2]

template<typename CRTP >
const CRTP & nngn::lua::detail::table_base< CRTP >::crtp ( void  ) const
inlineprivate
Here is the caller graph for this function:

◆ crtp() [2/2]

template<typename CRTP >
const CRTP & nngn::lua::detail::table_base< CRTP >::crtp ( void  ) const
inlineprivate

◆ end() [1/2]

template<typename CRTP >
table_iter< const CRTP > nngn::lua::detail::table_base< CRTP >::end ( void  ) const

Sentinel for begin.

◆ end() [2/2]

template<typename CRTP >
table_iter< const CRTP > nngn::lua::detail::table_base< CRTP >::end ( void  ) const

Sentinel for begin.

◆ end_op() [1/2]

template<typename CRTP >
void nngn::lua::detail::table_base< CRTP >::end_op ( int  ) const
inlineprivate

◆ end_op() [2/2]

template<typename CRTP >
void nngn::lua::detail::table_base< CRTP >::end_op ( int  ) const
inlineprivate

◆ get_common() [1/2]

template<typename CRTP >
template<op_mode mode, typename T >
T nngn::lua::detail::table_base< CRTP >::get_common ( auto &&  k,
T &&  def = T{} 
) const
protected
Here is the call graph for this function:

◆ get_common() [2/2]

template<typename CRTP >
template<op_mode mode, typename T >
T nngn::lua::detail::table_base< CRTP >::get_common ( auto &&  k,
T &&  def = T{} 
) const
protected

◆ get_field() [1/2]

template<typename CRTP >
template<typename T >
T nngn::lua::detail::table_base< CRTP >::get_field ( auto &&  k,
T &&  def = T{} 
) const

Gets field, with optional default value.

◆ get_field() [2/2]

template<typename CRTP >
template<typename T >
T nngn::lua::detail::table_base< CRTP >::get_field ( auto &&  k,
T &&  def = T{} 
) const

Gets field, with optional default value.

◆ ibegin() [1/2]

template<typename CRTP >
table_seq_iter< const CRTP > nngn::lua::detail::table_base< CRTP >::ibegin ( void  ) const

ipairs-style iteration.

See also
nngn::lua::ipairs

◆ ibegin() [2/2]

template<typename CRTP >
table_seq_iter< const CRTP > nngn::lua::detail::table_base< CRTP >::ibegin ( void  ) const

ipairs-style iteration.

See also
nngn::lua::ipairs

◆ iend() [1/2]

template<typename CRTP >
table_seq_iter< const CRTP > nngn::lua::detail::table_base< CRTP >::iend ( void  ) const

Sentinel for ibegin.

◆ iend() [2/2]

template<typename CRTP >
table_seq_iter< const CRTP > nngn::lua::detail::table_base< CRTP >::iend ( void  ) const

Sentinel for ibegin.

◆ operator[]() [1/2]

template<typename CRTP >
template<typename K >
table_proxy< CRTP, std::decay_t< K > > nngn::lua::detail::table_base< CRTP >::operator[] ( K &&  k) const

◆ operator[]() [2/2]

template<typename CRTP >
template<typename K >
table_proxy< CRTP, std::decay_t< K > > nngn::lua::detail::table_base< CRTP >::operator[] ( K &&  k) const

◆ raw_get() [1/2]

template<typename CRTP >
template<typename T >
T nngn::lua::detail::table_base< CRTP >::raw_get ( auto &&  k,
T &&  def = T{} 
) const

Gets field without meta methods.

◆ raw_get() [2/2]

template<typename CRTP >
template<typename T >
T nngn::lua::detail::table_base< CRTP >::raw_get ( auto &&  k,
T &&  def = T{} 
) const

Gets field without meta methods.

◆ raw_set() [1/2]

template<typename CRTP >
void nngn::lua::detail::table_base< CRTP >::raw_set ( auto &&  k,
auto &&  v 
) const

Sets a table field without meta methods.

Here is the caller graph for this function:

◆ raw_set() [2/2]

template<typename CRTP >
void nngn::lua::detail::table_base< CRTP >::raw_set ( auto &&  k,
auto &&  v 
) const

Sets a table field without meta methods.

◆ set() [1/4]

template<typename CRTP >
void nngn::lua::detail::table_base< CRTP >::set ( auto &&  k,
auto &&  v 
) const

Sets a table field.

Here is the caller graph for this function:

◆ set() [2/4]

template<typename CRTP >
void nngn::lua::detail::table_base< CRTP >::set ( auto &&  k,
auto &&  v 
) const

Sets a table field.

◆ set() [3/4]

template<typename CRTP >
template<typename ... Ts>
void nngn::lua::detail::table_base< CRTP >::set ( std::tuple< Ts... > &&  t) const

Sets multiple table fields.

Parameters
ta tuple of {k0, v0, k1, v1, ...}

◆ set() [4/4]

template<typename CRTP >
template<typename ... Ts>
void nngn::lua::detail::table_base< CRTP >::set ( std::tuple< Ts... > &&  t) const

Sets multiple table fields.

Parameters
ta tuple of {k0, v0, k1, v1, ...}

◆ set_common() [1/2]

template<typename CRTP >
template<op_mode mode>
void nngn::lua::detail::table_base< CRTP >::set_common ( auto &&  k,
auto &&  v 
) const
protected

◆ set_common() [2/2]

template<typename CRTP >
template<op_mode mode>
void nngn::lua::detail::table_base< CRTP >::set_common ( auto &&  k,
auto &&  v 
) const
protected

◆ size() [1/2]

template<typename CRTP >
lua_Integer nngn::lua::detail::table_base< CRTP >::size ( void  ) const
See also
lua_len
Here is the caller graph for this function:

◆ size() [2/2]

template<typename CRTP >
lua_Integer nngn::lua::detail::table_base< CRTP >::size ( void  ) const
See also
lua_len

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