OpenMiner  0.0.1a
Voxel game engine
Public Types | Public Member Functions | Public Attributes | List of all members
sol::function_detail::functor_function< Func, is_yielding, no_trampoline > Struct Template Reference

#include <sol.hpp>

Public Types

typedef std::decay_t< meta::unwrap_unqualified_t< Func > > function_type
 

Public Member Functions

template<typename... Args>
 functor_function (function_type f, Args &&... args)
 
int call (lua_State *L)
 
int operator() (lua_State *L)
 

Public Attributes

function_type fx
 

Member Typedef Documentation

§ function_type

template<typename Func , bool is_yielding, bool no_trampoline>
typedef std::decay_t<meta::unwrap_unqualified_t<Func> > sol::function_detail::functor_function< Func, is_yielding, no_trampoline >::function_type

Constructor & Destructor Documentation

§ functor_function()

template<typename Func , bool is_yielding, bool no_trampoline>
template<typename... Args>
sol::function_detail::functor_function< Func, is_yielding, no_trampoline >::functor_function ( function_type  f,
Args &&...  args 
)
inline
14146  : fx(std::move(f), std::forward<Args>(args)...) {
14147  }
function_type fx
Definition: sol.hpp:14142

Member Function Documentation

§ call()

template<typename Func , bool is_yielding, bool no_trampoline>
int sol::function_detail::functor_function< Func, is_yielding, no_trampoline >::call ( lua_State *  L)
inline
14149  {
14150  int nr = call_detail::call_wrapped<void, true, false>(L, fx);
14151  if (is_yielding) {
14152  return lua_yield(L, nr);
14153  }
14154  else {
14155  return nr;
14156  }
14157  }
function_type fx
Definition: sol.hpp:14142

§ operator()()

template<typename Func , bool is_yielding, bool no_trampoline>
int sol::function_detail::functor_function< Func, is_yielding, no_trampoline >::operator() ( lua_State *  L)
inline
14159  {
14160  if (!no_trampoline) {
14161  auto f = [&](lua_State*) -> int { return this->call(L); };
14162  return detail::trampoline(L, f);
14163  }
14164  else {
14165  return call(L);
14166  }
14167  }
int call(lua_State *L)
Definition: sol.hpp:14149
int trampoline(lua_State *L, Fx &&f, Args &&... args)
Definition: sol.hpp:5946

Member Data Documentation

§ fx

template<typename Func , bool is_yielding, bool no_trampoline>
function_type sol::function_detail::functor_function< Func, is_yielding, no_trampoline >::fx

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