OpenMiner  0.0.1a
Voxel game engine
Public Member Functions | Private Types | List of all members
sol::basic_userdata< base_type > Class Template Reference

#include <sol.hpp>

Inheritance diagram for sol::basic_userdata< base_type >:
sol::basic_table_core< top_level, base_type > sol::basic_object_base< base_type >

Public Member Functions

 basic_userdata () noexcept=default
 
template<typename T , meta::enable< meta::neg< std::is_same< meta::unqualified_t< T >, basic_userdata >>, meta::neg< std::is_same< base_t, stack_reference >>, is_lua_reference< meta::unqualified_t< T >>> = meta::enabler>
 basic_userdata (T &&r) noexcept
 
 basic_userdata (const basic_userdata &)=default
 
 basic_userdata (basic_userdata &&)=default
 
basic_userdataoperator= (const basic_userdata &)=default
 
basic_userdataoperator= (basic_userdata &&)=default
 
 basic_userdata (const stack_reference &r)
 
 basic_userdata (stack_reference &&r)
 
template<typename T , meta::enable< is_lua_reference< meta::unqualified_t< T >>> = meta::enabler>
 basic_userdata (lua_State *L, T &&r)
 
 basic_userdata (lua_State *L, int index=-1)
 
 basic_userdata (lua_State *L, ref_index index)
 
- Public Member Functions inherited from sol::basic_table_core< top_level, base_type >
 basic_table_core () noexcept=default
 
 basic_table_core (const basic_table_core &)=default
 
 basic_table_core (basic_table_core &&)=default
 
basic_table_coreoperator= (const basic_table_core &)=default
 
basic_table_coreoperator= (basic_table_core &&)=default
 
 basic_table_core (const stack_reference &r)
 
 basic_table_core (stack_reference &&r)
 
template<typename T , meta::enable_any< is_lua_reference< meta::unqualified_t< T >>> = meta::enabler>
 basic_table_core (lua_State *L, T &&r)
 
 basic_table_core (lua_State *L, const new_table &nt)
 
 basic_table_core (lua_State *L, int index=-1)
 
 basic_table_core (lua_State *L, ref_index index)
 
template<typename T , meta::enable< meta::neg< meta::any_same< meta::unqualified_t< T >, basic_table_core >>, meta::neg< std::is_same< base_type, stack_reference >>, meta::neg< std::is_same< lua_nil_t, meta::unqualified_t< T >>>, is_lua_reference< meta::unqualified_t< T >>> = meta::enabler>
 basic_table_core (T &&r) noexcept
 
 basic_table_core (lua_nil_t r) noexcept
 
iterator begin () const
 
iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
template<typename... Ret, typename... Keys>
decltype(auto) get (Keys &&... keys) const
 
template<typename T , typename Key >
decltype(auto) get_or (Key &&key, T &&otherwise) const
 
template<typename T , typename Key , typename D >
decltype(auto) get_or (Key &&key, D &&otherwise) const
 
template<typename T , typename... Keys>
decltype(auto) traverse_get (Keys &&... keys) const
 
template<typename... Keys>
basic_table_coretraverse_set (Keys &&... keys)
 
template<typename... Args>
basic_table_coreset (Args &&... args)
 
template<typename... Ret, typename... Keys>
decltype(auto) raw_get (Keys &&... keys) const
 
template<typename T , typename Key >
decltype(auto) raw_get_or (Key &&key, T &&otherwise) const
 
template<typename T , typename Key , typename D >
decltype(auto) raw_get_or (Key &&key, D &&otherwise) const
 
template<typename T , typename... Keys>
decltype(auto) traverse_raw_get (Keys &&... keys) const
 
template<typename... Keys>
basic_table_coretraverse_raw_set (Keys &&... keys)
 
template<typename... Args>
basic_table_coreraw_set (Args &&... args)
 
template<typename T >
basic_table_coreset_usertype (usertype< T > &user)
 
template<typename Key , typename T >
basic_table_coreset_usertype (Key &&key, usertype< T > &user)
 
template<typename Class , typename... Args>
basic_table_corenew_usertype (const std::string &name, Args &&... args)
 
template<typename Class , typename CTor0 , typename... CTor, typename... Args>
basic_table_corenew_usertype (const std::string &name, Args &&... args)
 
template<typename Class , typename... CArgs, typename... Args>
basic_table_corenew_usertype (const std::string &name, constructors< CArgs... > ctor, Args &&... args)
 
template<typename Class , typename... Args>
basic_table_corenew_simple_usertype (const std::string &name, Args &&... args)
 
template<typename Class , typename CTor0 , typename... CTor, typename... Args>
basic_table_corenew_simple_usertype (const std::string &name, Args &&... args)
 
template<typename Class , typename... CArgs, typename... Args>
basic_table_corenew_simple_usertype (const std::string &name, constructors< CArgs... > ctor, Args &&... args)
 
template<typename Class , typename... Args>
simple_usertype< Class > create_simple_usertype (Args &&... args)
 
template<typename Class , typename CTor0 , typename... CTor, typename... Args>
simple_usertype< Class > create_simple_usertype (Args &&... args)
 
template<typename Class , typename... CArgs, typename... Args>
simple_usertype< Class > create_simple_usertype (constructors< CArgs... > ctor, Args &&... args)
 
template<bool read_only = true, typename... Args>
table new_enum (const string_view &name, Args &&... args)
 
template<typename T , bool read_only = true>
table new_enum (const string_view &name, std::initializer_list< std::pair< string_view, T >> items)
 
template<typename Fx >
void for_each (Fx &&fx) const
 
size_t size () const
 
bool empty () const
 
template<typename T >
proxy< basic_table_core &, Toperator[] (T &&key) &
 
template<typename T >
proxy< const basic_table_core &, Toperator[] (T &&key) const &
 
template<typename T >
proxy< basic_table_core, Toperator[] (T &&key) &&
 
template<typename Sig , typename Key , typename... Args>
basic_table_coreset_function (Key &&key, Args &&... args)
 
template<typename Key , typename... Args>
basic_table_coreset_function (Key &&key, Args &&... args)
 
template<typename... Args>
basic_table_coreadd (Args &&... args)
 
table create (int narr=0, int nrec=0)
 
template<typename Key , typename Value , typename... Args>
table create (int narr, int nrec, Key &&key, Value &&value, Args &&... args)
 
template<typename Name >
table create (Name &&name, int narr=0, int nrec=0)
 
template<typename Name , typename Key , typename Value , typename... Args>
table create (Name &&name, int narr, int nrec, Key &&key, Value &&value, Args &&... args)
 
template<typename... Args>
table create_with (Args &&... args)
 
template<typename Name , typename... Args>
table create_named (Name &&name, Args &&... args)
 
- Public Member Functions inherited from sol::basic_object_base< base_type >
 basic_object_base () noexcept=default
 
 basic_object_base (const basic_object_base &)=default
 
 basic_object_base (basic_object_base &&)=default
 
 basic_object_base (T &&arg, Args &&... args)
 
basic_object_baseoperator= (const basic_object_base &)=default
 
basic_object_baseoperator= (basic_object_base &&)=default
 
decltype(auto) as () const
 
bool is () const
 

Private Types

typedef basic_table< base_type > base_t
 

Additional Inherited Members

- Public Types inherited from sol::basic_table_core< top_level, base_type >
typedef basic_table_iterator< base_type > iterator
 
typedef iterator const_iterator
 
- Static Public Member Functions inherited from sol::basic_table_core< top_level, base_type >
static table create (lua_State *L, int narr=0, int nrec=0)
 
template<typename Key , typename Value , typename... Args>
static table create (lua_State *L, int narr, int nrec, Key &&key, Value &&value, Args &&... args)
 
template<typename... Args>
static table create_with (lua_State *L, Args &&... args)
 
- Protected Member Functions inherited from sol::basic_table_core< top_level, base_type >
 basic_table_core (detail::no_safety_tag, lua_nil_t n)
 
 basic_table_core (detail::no_safety_tag, lua_State *L, int index)
 
 basic_table_core (detail::no_safety_tag, lua_State *L, ref_index index)
 
template<typename T , meta::enable< meta::neg< meta::any_same< meta::unqualified_t< T >, basic_table_core >>, meta::neg< std::is_same< base_type, stack_reference >>, meta::neg< std::is_same< lua_nil_t, meta::unqualified_t< T >>>, is_lua_reference< meta::unqualified_t< T >>> = meta::enabler>
 basic_table_core (detail::no_safety_tag, T &&r) noexcept
 
template<typename T , meta::enable< is_lua_reference< meta::unqualified_t< T >>> = meta::enabler>
 basic_table_core (detail::no_safety_tag, lua_State *L, T &&r) noexcept
 

Member Typedef Documentation

§ base_t

template<typename base_type >
typedef basic_table<base_type> sol::basic_userdata< base_type >::base_t
private

Constructor & Destructor Documentation

§ basic_userdata() [1/9]

template<typename base_type >
sol::basic_userdata< base_type >::basic_userdata ( )
defaultnoexcept

§ basic_userdata() [2/9]

template<typename base_type >
template<typename T , meta::enable< meta::neg< std::is_same< meta::unqualified_t< T >, basic_userdata >>, meta::neg< std::is_same< base_t, stack_reference >>, is_lua_reference< meta::unqualified_t< T >>> = meta::enabler>
sol::basic_userdata< base_type >::basic_userdata ( T &&  r)
inlinenoexcept
15834  : base_t(std::forward<T>(r)) {
15835 #if defined(SOL_SAFE_REFERENCES) && SOL_SAFE_REFERENCES
15836  if (!is_userdata<meta::unqualified_t<T>>::value) {
15837  auto pp = stack::push_pop(*this);
15838  type_assert(lua_state(), -1, type::userdata);
15839  }
15840 #endif // Safety
15841  }
basic_table< base_type > base_t
Definition: sol.hpp:15826
void type_assert(lua_State *L, int index, type expected, type actual) noexcept(false)
Definition: sol.hpp:6414
push_popper< top_level, T > push_pop(T &&x)
Definition: sol.hpp:6661

§ basic_userdata() [3/9]

template<typename base_type >
sol::basic_userdata< base_type >::basic_userdata ( const basic_userdata< base_type > &  )
default

§ basic_userdata() [4/9]

template<typename base_type >
sol::basic_userdata< base_type >::basic_userdata ( basic_userdata< base_type > &&  )
default

§ basic_userdata() [5/9]

template<typename base_type >
sol::basic_userdata< base_type >::basic_userdata ( const stack_reference r)
inline
15847  : basic_userdata(r.lua_state(), r.stack_index()) {
15848  }
basic_userdata() noexcept=default

§ basic_userdata() [6/9]

template<typename base_type >
sol::basic_userdata< base_type >::basic_userdata ( stack_reference &&  r)
inline
15850  : basic_userdata(r.lua_state(), r.stack_index()) {
15851  }
basic_userdata() noexcept=default

§ basic_userdata() [7/9]

template<typename base_type >
template<typename T , meta::enable< is_lua_reference< meta::unqualified_t< T >>> = meta::enabler>
sol::basic_userdata< base_type >::basic_userdata ( lua_State *  L,
T &&  r 
)
inline
15854  : base_t(L, std::forward<T>(r)) {
15855 #if defined(SOL_SAFE_REFERENCES) && SOL_SAFE_REFERENCES
15856  auto pp = stack::push_pop(*this);
15857  constructor_handler handler{};
15858  stack::check<basic_userdata>(L, -1, handler);
15859 #endif // Safety
15860  }
basic_table< base_type > base_t
Definition: sol.hpp:15826
push_popper< top_level, T > push_pop(T &&x)
Definition: sol.hpp:6661

§ basic_userdata() [8/9]

template<typename base_type >
sol::basic_userdata< base_type >::basic_userdata ( lua_State *  L,
int  index = -1 
)
inline
15862  : base_t(detail::no_safety, L, index) {
15863 #if defined(SOL_SAFE_REFERENCES) && SOL_SAFE_REFERENCES
15864  constructor_handler handler{};
15865  stack::check<basic_userdata>(L, index, handler);
15866 #endif // Safety
15867  }
basic_table< base_type > base_t
Definition: sol.hpp:15826
struct sol::detail::no_safety_tag no_safety

§ basic_userdata() [9/9]

template<typename base_type >
sol::basic_userdata< base_type >::basic_userdata ( lua_State *  L,
ref_index  index 
)
inline
15869  : base_t(detail::no_safety, L, index) {
15870 #if defined(SOL_SAFE_REFERENCES) && SOL_SAFE_REFERENCES
15871  auto pp = stack::push_pop(*this);
15872  constructor_handler handler{};
15873  stack::check<basic_userdata>(L, -1, handler);
15874 #endif // Safety
15875  }
basic_table< base_type > base_t
Definition: sol.hpp:15826
struct sol::detail::no_safety_tag no_safety
push_popper< top_level, T > push_pop(T &&x)
Definition: sol.hpp:6661

Member Function Documentation

§ operator=() [1/2]

template<typename base_type >
basic_userdata& sol::basic_userdata< base_type >::operator= ( const basic_userdata< base_type > &  )
default

§ operator=() [2/2]

template<typename base_type >
basic_userdata& sol::basic_userdata< base_type >::operator= ( basic_userdata< base_type > &&  )
default

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