OpenMiner  0.0.1a
Voxel game engine
Public Types | Public Member Functions | Private Attributes | List of all members
sol::unsafe_function_result Struct Reference

#include <sol.hpp>

Inheritance diagram for sol::unsafe_function_result:
sol::proxy_base< unsafe_function_result > sol::proxy_base_tag

Public Types

typedef stack_proxy reference_type
 
typedef stack_proxy value_type
 
typedef stack_proxypointer
 
typedef std::ptrdiff_t difference_type
 
typedef std::size_t size_type
 
typedef stack_iterator< stack_proxy, false > iterator
 
typedef stack_iterator< stack_proxy, true > const_iterator
 
typedef std::reverse_iterator< iteratorreverse_iterator
 
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 

Public Member Functions

 unsafe_function_result ()=default
 
 unsafe_function_result (lua_State *Ls, int idx=-1, int retnum=0)
 
 unsafe_function_result (const unsafe_function_result &)=default
 
unsafe_function_resultoperator= (const unsafe_function_result &)=default
 
 unsafe_function_result (unsafe_function_result &&o)
 
unsafe_function_resultoperator= (unsafe_function_result &&o)
 
 unsafe_function_result (const protected_function_result &o)=delete
 
unsafe_function_resultoperator= (const protected_function_result &o)=delete
 
 unsafe_function_result (protected_function_result &&o) noexcept
 
unsafe_function_resultoperator= (protected_function_result &&o) noexcept
 
template<typename T >
decltype(auto) get (difference_type index_offset=0) const
 
type get_type (difference_type index_offset=0) const noexcept
 
stack_proxy operator[] (difference_type index_offset) const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
call_status status () const noexcept
 
bool valid () const noexcept
 
lua_State * lua_state () const
 
int stack_index () const
 
int return_count () const
 
void abandon () noexcept
 
 ~unsafe_function_result ()
 
- Public Member Functions inherited from sol::proxy_base< unsafe_function_result >
 operator std::string () const
 
 operator T () const
 
 operator T& () const
 
lua_State * lua_state () const
 

Private Attributes

lua_State * L
 
int index
 
int returncount
 

Member Typedef Documentation

§ const_iterator

§ const_reverse_iterator

§ difference_type

§ iterator

§ pointer

§ reference_type

§ reverse_iterator

§ size_type

§ value_type

Constructor & Destructor Documentation

§ unsafe_function_result() [1/6]

sol::unsafe_function_result::unsafe_function_result ( )
default

§ unsafe_function_result() [2/6]

sol::unsafe_function_result::unsafe_function_result ( lua_State *  Ls,
int  idx = -1,
int  retnum = 0 
)
inline
12425  : L(Ls), index(idx), returncount(retnum) {
12426  }
int returncount
Definition: sol.hpp:12410
lua_State * L
Definition: sol.hpp:12408
int index
Definition: sol.hpp:12409

§ unsafe_function_result() [3/6]

sol::unsafe_function_result::unsafe_function_result ( const unsafe_function_result )
default

§ unsafe_function_result() [4/6]

sol::unsafe_function_result::unsafe_function_result ( unsafe_function_result &&  o)
inline
12430  : L(o.L), index(o.index), returncount(o.returncount) {
12431  // Must be manual, otherwise destructor will screw us
12432  // return count being 0 is enough to keep things clean
12433  // but will be thorough
12434  o.abandon();
12435  }
int returncount
Definition: sol.hpp:12410
lua_State * L
Definition: sol.hpp:12408
int index
Definition: sol.hpp:12409

§ unsafe_function_result() [5/6]

sol::unsafe_function_result::unsafe_function_result ( const protected_function_result o)
delete

§ unsafe_function_result() [6/6]

sol::unsafe_function_result::unsafe_function_result ( protected_function_result &&  o)
inlinenoexcept
15436  : L(o.lua_state()), index(o.stack_index()), returncount(o.return_count()) {
15437  // Must be manual, otherwise destructor will screw us
15438  // return count being 0 is enough to keep things clean
15439  // but we will be thorough
15440  o.abandon();
15441  }
int returncount
Definition: sol.hpp:12410
lua_State * L
Definition: sol.hpp:12408
int index
Definition: sol.hpp:12409

§ ~unsafe_function_result()

sol::unsafe_function_result::~unsafe_function_result ( )
inline
12525  {
12526  lua_pop(L, returncount);
12527  }
int returncount
Definition: sol.hpp:12410
lua_State * L
Definition: sol.hpp:12408

Member Function Documentation

§ abandon()

void sol::unsafe_function_result::abandon ( )
inlinenoexcept
12520  {
12521  //L = nullptr;
12522  index = 0;
12523  returncount = 0;
12524  }
int returncount
Definition: sol.hpp:12410
int index
Definition: sol.hpp:12409

§ begin() [1/2]

iterator sol::unsafe_function_result::begin ( )
inline
12465  {
12466  return iterator(L, index, stack_index() + return_count());
12467  }
int stack_index() const
Definition: sol.hpp:12514
int return_count() const
Definition: sol.hpp:12517
stack_iterator< stack_proxy, false > iterator
Definition: sol.hpp:12418
lua_State * L
Definition: sol.hpp:12408
int index
Definition: sol.hpp:12409

§ begin() [2/2]

const_iterator sol::unsafe_function_result::begin ( ) const
inline
12471  {
12472  return const_iterator(L, index, stack_index() + return_count());
12473  }
stack_iterator< stack_proxy, true > const_iterator
Definition: sol.hpp:12419
int stack_index() const
Definition: sol.hpp:12514
int return_count() const
Definition: sol.hpp:12517
lua_State * L
Definition: sol.hpp:12408
int index
Definition: sol.hpp:12409

§ cbegin()

const_iterator sol::unsafe_function_result::cbegin ( ) const
inline
12477  {
12478  return begin();
12479  }
iterator begin()
Definition: sol.hpp:12465

§ cend()

const_iterator sol::unsafe_function_result::cend ( ) const
inline
12480  {
12481  return end();
12482  }
iterator end()
Definition: sol.hpp:12468

§ crbegin()

const_reverse_iterator sol::unsafe_function_result::crbegin ( ) const
inline
12496  {
12497  return std::reverse_iterator<const_iterator>(cbegin());
12498  }
const_iterator cbegin() const
Definition: sol.hpp:12477

§ crend()

const_reverse_iterator sol::unsafe_function_result::crend ( ) const
inline
12499  {
12500  return std::reverse_iterator<const_iterator>(cend());
12501  }
const_iterator cend() const
Definition: sol.hpp:12480

§ end() [1/2]

iterator sol::unsafe_function_result::end ( )
inline
12468  {
12470  }
int stack_index() const
Definition: sol.hpp:12514
int return_count() const
Definition: sol.hpp:12517
stack_iterator< stack_proxy, false > iterator
Definition: sol.hpp:12418
lua_State * L
Definition: sol.hpp:12408

§ end() [2/2]

const_iterator sol::unsafe_function_result::end ( ) const
inline
12474  {
12476  }
stack_iterator< stack_proxy, true > const_iterator
Definition: sol.hpp:12419
int stack_index() const
Definition: sol.hpp:12514
int return_count() const
Definition: sol.hpp:12517
lua_State * L
Definition: sol.hpp:12408

§ get()

template<typename T >
decltype(auto) sol::unsafe_function_result::get ( difference_type  index_offset = 0) const
inline
12453  {
12454  return stack::get<T>(L, index + static_cast<int>(index_offset));
12455  }
lua_State * L
Definition: sol.hpp:12408
int index
Definition: sol.hpp:12409

§ get_type()

type sol::unsafe_function_result::get_type ( difference_type  index_offset = 0) const
inlinenoexcept
12457  {
12458  return type_of(L, index + static_cast<int>(index_offset));
12459  }
type type_of(lua_State *L, int index)
Definition: sol.hpp:5358
lua_State * L
Definition: sol.hpp:12408
int index
Definition: sol.hpp:12409

§ lua_state()

lua_State* sol::unsafe_function_result::lua_state ( ) const
inline
12511  {
12512  return L;
12513  };
lua_State * L
Definition: sol.hpp:12408

§ operator=() [1/4]

unsafe_function_result& sol::unsafe_function_result::operator= ( const unsafe_function_result )
default

§ operator=() [2/4]

unsafe_function_result& sol::unsafe_function_result::operator= ( unsafe_function_result &&  o)
inline
12436  {
12437  L = o.L;
12438  index = o.index;
12439  returncount = o.returncount;
12440  // Must be manual, otherwise destructor will screw us
12441  // return count being 0 is enough to keep things clean
12442  // but will be thorough
12443  o.abandon();
12444  return *this;
12445  }
int returncount
Definition: sol.hpp:12410
lua_State * L
Definition: sol.hpp:12408
int index
Definition: sol.hpp:12409

§ operator=() [3/4]

unsafe_function_result& sol::unsafe_function_result::operator= ( const protected_function_result o)
delete

§ operator=() [4/4]

unsafe_function_result & sol::unsafe_function_result::operator= ( protected_function_result &&  o)
inlinenoexcept
15442  {
15443  L = o.lua_state();
15444  index = o.stack_index();
15445  returncount = o.return_count();
15446  // Must be manual, otherwise destructor will screw us
15447  // return count being 0 is enough to keep things clean
15448  // but we will be thorough
15449  o.abandon();
15450  return *this;
15451  }
int returncount
Definition: sol.hpp:12410
lua_State * L
Definition: sol.hpp:12408
int index
Definition: sol.hpp:12409

§ operator[]()

stack_proxy sol::unsafe_function_result::operator[] ( difference_type  index_offset) const
inline
12461  {
12462  return stack_proxy(L, index + static_cast<int>(index_offset));
12463  }
lua_State * L
Definition: sol.hpp:12408
int index
Definition: sol.hpp:12409

§ rbegin() [1/2]

reverse_iterator sol::unsafe_function_result::rbegin ( )
inline
12484  {
12485  return std::reverse_iterator<iterator>(begin());
12486  }
iterator begin()
Definition: sol.hpp:12465

§ rbegin() [2/2]

const_reverse_iterator sol::unsafe_function_result::rbegin ( ) const
inline
12490  {
12491  return std::reverse_iterator<const_iterator>(begin());
12492  }
iterator begin()
Definition: sol.hpp:12465

§ rend() [1/2]

reverse_iterator sol::unsafe_function_result::rend ( )
inline
12487  {
12488  return std::reverse_iterator<iterator>(end());
12489  }
iterator end()
Definition: sol.hpp:12468

§ rend() [2/2]

const_reverse_iterator sol::unsafe_function_result::rend ( ) const
inline
12493  {
12494  return std::reverse_iterator<const_iterator>(end());
12495  }
iterator end()
Definition: sol.hpp:12468

§ return_count()

int sol::unsafe_function_result::return_count ( ) const
inline
12517  {
12518  return returncount;
12519  };
int returncount
Definition: sol.hpp:12410

§ stack_index()

int sol::unsafe_function_result::stack_index ( ) const
inline
12514  {
12515  return index;
12516  };
int index
Definition: sol.hpp:12409

§ status()

call_status sol::unsafe_function_result::status ( ) const
inlinenoexcept
12503  {
12504  return call_status::ok;
12505  }

§ valid()

bool sol::unsafe_function_result::valid ( ) const
inlinenoexcept
12507  {
12508  return status() == call_status::ok || status() == call_status::yielded;
12509  }
call_status status() const noexcept
Definition: sol.hpp:12503

Member Data Documentation

§ index

int sol::unsafe_function_result::index
private

§ L

lua_State* sol::unsafe_function_result::L
private

§ returncount

int sol::unsafe_function_result::returncount
private

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