OpenMiner  0.0.1a
Voxel game engine
Public Types | Public Member Functions | Public Attributes | List of all members
sol::stack_iterator< proxy_t, is_const > Struct Template Reference

#include <sol.hpp>

Public Types

typedef std::conditional_t< is_const, const proxy_t, proxy_t > reference
 
typedef std::conditional_t< is_const, const proxy_t *, proxy_t * > pointer
 
typedef proxy_t value_type
 
typedef std::ptrdiff_t difference_type
 
typedef std::random_access_iterator_tag iterator_category
 

Public Member Functions

 stack_iterator ()
 
 stack_iterator (const stack_iterator< proxy_t, true > &r)
 
 stack_iterator (lua_State *luastate, int idx, int topidx)
 
reference operator* ()
 
reference operator* () const
 
pointer operator-> ()
 
pointer operator-> () const
 
stack_iteratoroperator++ ()
 
stack_iterator operator++ (int)
 
stack_iteratoroperator-- ()
 
stack_iterator operator-- (int)
 
stack_iteratoroperator+= (difference_type idx)
 
stack_iteratoroperator-= (difference_type idx)
 
difference_type operator- (const stack_iterator &r) const
 
stack_iterator operator+ (difference_type idx) const
 
reference operator[] (difference_type idx) const
 
bool operator== (const stack_iterator &r) const
 
bool operator!= (const stack_iterator &r) const
 
bool operator< (const stack_iterator &r) const
 
bool operator> (const stack_iterator &r) const
 
bool operator<= (const stack_iterator &r) const
 
bool operator>= (const stack_iterator &r) const
 

Public Attributes

lua_State * L
 
int index
 
int stacktop
 
proxy_t sp
 

Member Typedef Documentation

§ difference_type

template<typename proxy_t, bool is_const>
typedef std::ptrdiff_t sol::stack_iterator< proxy_t, is_const >::difference_type

§ iterator_category

template<typename proxy_t, bool is_const>
typedef std::random_access_iterator_tag sol::stack_iterator< proxy_t, is_const >::iterator_category

§ pointer

template<typename proxy_t, bool is_const>
typedef std::conditional_t<is_const, const proxy_t*, proxy_t*> sol::stack_iterator< proxy_t, is_const >::pointer

§ reference

template<typename proxy_t, bool is_const>
typedef std::conditional_t<is_const, const proxy_t, proxy_t> sol::stack_iterator< proxy_t, is_const >::reference

§ value_type

template<typename proxy_t, bool is_const>
typedef proxy_t sol::stack_iterator< proxy_t, is_const >::value_type

Constructor & Destructor Documentation

§ stack_iterator() [1/3]

template<typename proxy_t, bool is_const>
sol::stack_iterator< proxy_t, is_const >::stack_iterator ( )
inline
11987  : L(nullptr), index((std::numeric_limits<int>::max)()), stacktop((std::numeric_limits<int>::max)()), sp() {
11988  }
proxy_t sp
Definition: sol.hpp:11984
int index
Definition: sol.hpp:11982
lua_State * L
Definition: sol.hpp:11981
int stacktop
Definition: sol.hpp:11983

§ stack_iterator() [2/3]

template<typename proxy_t, bool is_const>
sol::stack_iterator< proxy_t, is_const >::stack_iterator ( const stack_iterator< proxy_t, true > &  r)
inline
11990  : L(r.L), index(r.index), stacktop(r.stacktop), sp(r.sp) {
11991  }
proxy_t sp
Definition: sol.hpp:11984
int index
Definition: sol.hpp:11982
lua_State * L
Definition: sol.hpp:11981
int stacktop
Definition: sol.hpp:11983

§ stack_iterator() [3/3]

template<typename proxy_t, bool is_const>
sol::stack_iterator< proxy_t, is_const >::stack_iterator ( lua_State *  luastate,
int  idx,
int  topidx 
)
inline
11993  : L(luastate), index(idx), stacktop(topidx), sp(luastate, idx) {
11994  }
proxy_t sp
Definition: sol.hpp:11984
int index
Definition: sol.hpp:11982
lua_State * L
Definition: sol.hpp:11981
int stacktop
Definition: sol.hpp:11983

Member Function Documentation

§ operator!=()

template<typename proxy_t, bool is_const>
bool sol::stack_iterator< proxy_t, is_const >::operator!= ( const stack_iterator< proxy_t, is_const > &  r) const
inline
12070  {
12071  return !(this->operator==(r));
12072  }
bool operator==(const stack_iterator &r) const
Definition: sol.hpp:12060

§ operator*() [1/2]

template<typename proxy_t, bool is_const>
reference sol::stack_iterator< proxy_t, is_const >::operator* ( )
inline
11996  {
11997  return proxy_t(L, index);
11998  }
int index
Definition: sol.hpp:11982
lua_State * L
Definition: sol.hpp:11981

§ operator*() [2/2]

template<typename proxy_t, bool is_const>
reference sol::stack_iterator< proxy_t, is_const >::operator* ( ) const
inline
12000  {
12001  return proxy_t(L, index);
12002  }
int index
Definition: sol.hpp:11982
lua_State * L
Definition: sol.hpp:11981

§ operator+()

template<typename proxy_t, bool is_const>
stack_iterator sol::stack_iterator< proxy_t, is_const >::operator+ ( difference_type  idx) const
inline
12050  {
12051  stack_iterator r = *this;
12052  r += idx;
12053  return r;
12054  }
stack_iterator()
Definition: sol.hpp:11986

§ operator++() [1/2]

template<typename proxy_t, bool is_const>
stack_iterator& sol::stack_iterator< proxy_t, is_const >::operator++ ( )
inline
12014  {
12015  ++index;
12016  return *this;
12017  }
int index
Definition: sol.hpp:11982

§ operator++() [2/2]

template<typename proxy_t, bool is_const>
stack_iterator sol::stack_iterator< proxy_t, is_const >::operator++ ( int  )
inline
12019  {
12020  auto r = *this;
12021  this->operator++();
12022  return r;
12023  }
stack_iterator & operator++()
Definition: sol.hpp:12014

§ operator+=()

template<typename proxy_t, bool is_const>
stack_iterator& sol::stack_iterator< proxy_t, is_const >::operator+= ( difference_type  idx)
inline
12036  {
12037  index += static_cast<int>(idx);
12038  return *this;
12039  }
int index
Definition: sol.hpp:11982

§ operator-()

template<typename proxy_t, bool is_const>
difference_type sol::stack_iterator< proxy_t, is_const >::operator- ( const stack_iterator< proxy_t, is_const > &  r) const
inline
12046  {
12047  return index - r.index;
12048  }
int index
Definition: sol.hpp:11982

§ operator--() [1/2]

template<typename proxy_t, bool is_const>
stack_iterator& sol::stack_iterator< proxy_t, is_const >::operator-- ( )
inline
12025  {
12026  --index;
12027  return *this;
12028  }
int index
Definition: sol.hpp:11982

§ operator--() [2/2]

template<typename proxy_t, bool is_const>
stack_iterator sol::stack_iterator< proxy_t, is_const >::operator-- ( int  )
inline
12030  {
12031  auto r = *this;
12032  this->operator--();
12033  return r;
12034  }
stack_iterator & operator--()
Definition: sol.hpp:12025

§ operator-=()

template<typename proxy_t, bool is_const>
stack_iterator& sol::stack_iterator< proxy_t, is_const >::operator-= ( difference_type  idx)
inline
12041  {
12042  index -= static_cast<int>(idx);
12043  return *this;
12044  }
int index
Definition: sol.hpp:11982

§ operator->() [1/2]

template<typename proxy_t, bool is_const>
pointer sol::stack_iterator< proxy_t, is_const >::operator-> ( )
inline
12004  {
12005  sp = proxy_t(L, index);
12006  return &sp;
12007  }
proxy_t sp
Definition: sol.hpp:11984
int index
Definition: sol.hpp:11982
lua_State * L
Definition: sol.hpp:11981

§ operator->() [2/2]

template<typename proxy_t, bool is_const>
pointer sol::stack_iterator< proxy_t, is_const >::operator-> ( ) const
inline
12009  {
12010  const_cast<proxy_t&>(sp) = proxy_t(L, index);
12011  return &sp;
12012  }
proxy_t sp
Definition: sol.hpp:11984
int index
Definition: sol.hpp:11982
lua_State * L
Definition: sol.hpp:11981

§ operator<()

template<typename proxy_t, bool is_const>
bool sol::stack_iterator< proxy_t, is_const >::operator< ( const stack_iterator< proxy_t, is_const > &  r) const
inline
12074  {
12075  return index < r.index;
12076  }
int index
Definition: sol.hpp:11982

§ operator<=()

template<typename proxy_t, bool is_const>
bool sol::stack_iterator< proxy_t, is_const >::operator<= ( const stack_iterator< proxy_t, is_const > &  r) const
inline
12082  {
12083  return index <= r.index;
12084  }
int index
Definition: sol.hpp:11982

§ operator==()

template<typename proxy_t, bool is_const>
bool sol::stack_iterator< proxy_t, is_const >::operator== ( const stack_iterator< proxy_t, is_const > &  r) const
inline
12060  {
12061  if (stacktop == (std::numeric_limits<int>::max)()) {
12062  return r.index == r.stacktop;
12063  }
12064  else if (r.stacktop == (std::numeric_limits<int>::max)()) {
12065  return index == stacktop;
12066  }
12067  return index == r.index;
12068  }
int index
Definition: sol.hpp:11982
int stacktop
Definition: sol.hpp:11983

§ operator>()

template<typename proxy_t, bool is_const>
bool sol::stack_iterator< proxy_t, is_const >::operator> ( const stack_iterator< proxy_t, is_const > &  r) const
inline
12078  {
12079  return index > r.index;
12080  }
int index
Definition: sol.hpp:11982

§ operator>=()

template<typename proxy_t, bool is_const>
bool sol::stack_iterator< proxy_t, is_const >::operator>= ( const stack_iterator< proxy_t, is_const > &  r) const
inline
12086  {
12087  return index >= r.index;
12088  }
int index
Definition: sol.hpp:11982

§ operator[]()

template<typename proxy_t, bool is_const>
reference sol::stack_iterator< proxy_t, is_const >::operator[] ( difference_type  idx) const
inline
12056  {
12057  return proxy_t(L, index + static_cast<int>(idx));
12058  }
int index
Definition: sol.hpp:11982
lua_State * L
Definition: sol.hpp:11981

Member Data Documentation

§ index

template<typename proxy_t, bool is_const>
int sol::stack_iterator< proxy_t, is_const >::index

§ L

template<typename proxy_t, bool is_const>
lua_State* sol::stack_iterator< proxy_t, is_const >::L

§ sp

template<typename proxy_t, bool is_const>
proxy_t sol::stack_iterator< proxy_t, is_const >::sp

§ stacktop

template<typename proxy_t, bool is_const>
int sol::stack_iterator< proxy_t, is_const >::stacktop

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