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

Base, non-owning generic stack value reference. More...

#include <value.h>

Inheritance diagram for nngn::lua::value_view:
Collaboration diagram for nngn::lua::value_view:

Public Member Functions

 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
 

Private Attributes

state_view m_state = {}
 
int m_index = 0
 

Detailed Description

Base, non-owning generic stack value reference.

Constructor & Destructor Documentation

◆ value_view() [1/5]

nngn::lua::value_view::value_view ( )
default

◆ value_view() [2/5]

nngn::lua::value_view::value_view ( const value_view & )
default

◆ value_view() [3/5]

nngn::lua::value_view::value_view ( value_view && )
defaultnoexcept

◆ value_view() [4/5]

nngn::lua::value_view::value_view ( lua_State * L,
int i )
inline

◆ value_view() [5/5]

nngn::lua::value_view::value_view ( state_view l,
int i )
inline

◆ ~value_view()

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

Member Function Documentation

◆ get() [1/2]

void nngn::lua::value_view::get ( lua_State * L,
int i )
inline
Here is the caller graph for this function:

◆ get() [2/2]

template<typename T >
requires (detail::can_get<T>)
T nngn::lua::value_view::get ( void ) const
Here is the caller graph for this function:

◆ get_type()

type nngn::lua::value_view::get_type ( void ) const
inline

Type of value at index i.

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

◆ index()

int nngn::lua::value_view::index ( void ) const
inline

Lua stack index.

Here is the caller graph for this function:

◆ is_nil()

bool nngn::lua::value_view::is_nil ( void ) const
inline
See also
lua_isnil
Here is the call graph for this function:

◆ operator T()

template<typename T >
nngn::lua::value_view::operator T ( void ) const
inlineexplicit
Here is the call graph for this function:

◆ operator=() [1/2]

value_view & nngn::lua::value_view::operator= ( const value_view & )
default

◆ operator=() [2/2]

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

◆ push() [1/2]

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

◆ push() [2/2]

template<typename R >
R nngn::lua::value_view::push ( void ) const
Here is the call graph for this function:

◆ release()

state_view nngn::lua::value_view::release ( void )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ state()

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

◆ to_string()

auto nngn::lua::value_view::to_string ( void ) const
inline
See also
state_view::to_string
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_index

int nngn::lua::value_view::m_index = 0
private

◆ m_state

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

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