OpenMiner  0.0.1a
Voxel game engine
Public Types | Public Member Functions | Public Attributes | List of all members
sol::detail::protected_handler< b, target_t > Struct Template Reference

#include <sol.hpp>

Public Types

typedef is_stack_based< target_t > is_stack
 

Public Member Functions

 protected_handler (std::false_type, const target_t &target)
 
 protected_handler (std::true_type, const target_t &target)
 
 protected_handler (const target_t &target)
 
bool valid () const noexcept
 
 ~protected_handler ()
 

Public Attributes

const target_t & target
 
int stackindex
 

Member Typedef Documentation

§ is_stack

template<bool b, typename target_t = reference>
typedef is_stack_based<target_t> sol::detail::protected_handler< b, target_t >::is_stack

Constructor & Destructor Documentation

§ protected_handler() [1/3]

template<bool b, typename target_t = reference>
sol::detail::protected_handler< b, target_t >::protected_handler ( std::false_type  ,
const target_t &  target 
)
inline
15066  : target(target), stackindex(0) {
15067  if (b) {
15068  stackindex = lua_gettop(target.lua_state()) + 1;
15069  target.push();
15070  }
15071  }
int stackindex
Definition: sol.hpp:15063
const target_t & target
Definition: sol.hpp:15062

§ protected_handler() [2/3]

template<bool b, typename target_t = reference>
sol::detail::protected_handler< b, target_t >::protected_handler ( std::true_type  ,
const target_t &  target 
)
inline
15074  : target(target), stackindex(0) {
15075  if (b) {
15076  stackindex = target.stack_index();
15077  }
15078  }
int stackindex
Definition: sol.hpp:15063
const target_t & target
Definition: sol.hpp:15062

§ protected_handler() [3/3]

template<bool b, typename target_t = reference>
sol::detail::protected_handler< b, target_t >::protected_handler ( const target_t &  target)
inline
15082  }
protected_handler(std::false_type, const target_t &target)
Definition: sol.hpp:15065
is_stack_based< target_t > is_stack
Definition: sol.hpp:15061
const target_t & target
Definition: sol.hpp:15062

§ ~protected_handler()

template<bool b, typename target_t = reference>
sol::detail::protected_handler< b, target_t >::~protected_handler ( )
inline
15088  {
15089  if (!is_stack::value && stackindex != 0) {
15090  lua_remove(target.lua_state(), stackindex);
15091  }
15092  }
int stackindex
Definition: sol.hpp:15063
const target_t & target
Definition: sol.hpp:15062

Member Function Documentation

§ valid()

template<bool b, typename target_t = reference>
bool sol::detail::protected_handler< b, target_t >::valid ( ) const
inlinenoexcept
15084  {
15085  return b;
15086  }

Member Data Documentation

§ stackindex

template<bool b, typename target_t = reference>
int sol::detail::protected_handler< b, target_t >::stackindex

§ target

template<bool b, typename target_t = reference>
const target_t& sol::detail::protected_handler< b, target_t >::target

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