The Battle for Wesnoth  1.15.0-dev
Namespaces | Classes | Typedefs | Functions
lua_check_impl Namespace Reference

Namespaces

 detail
 

Classes

struct  is_container
 
struct  is_map
 
struct  is_pair
 

Typedefs

template<typename T >
using remove_constref = std::remove_const_t< std::remove_reference_t< std::remove_const_t< T > >>
 

Functions

template<typename T >
std::enable_if_t< std::is_same< T, std::string >::value, std::string > lua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< std::is_same< T, std::string >::value, void > lua_push (lua_State *L, const T &val)
 
template<typename T >
std::enable_if_t< std::is_same< T, config >::value, configlua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< std::is_same< T, config >::value, void > lua_push (lua_State *L, const config &val)
 
template<typename T >
std::enable_if_t< std::is_same< T, map_location >::value, map_locationlua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< std::is_same< T, map_location >::value, void > lua_push (lua_State *L, const map_location &val)
 
template<typename T >
std::enable_if_t< std::is_base_of< enum_tag, T >::value, T > lua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< std::is_base_of< enum_tag, T >::value, void > lua_push (lua_State *L, T val)
 
template<typename T >
std::enable_if_t< std::is_same< T, t_string >::value, t_stringlua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< std::is_same< T, t_string >::value, void > lua_push (lua_State *L, const t_string &val)
 
template<typename T >
std::enable_if_t< std::is_same< T, bool >::value, bool > lua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< std::is_same< T, bool >::value, void > lua_push (lua_State *L, bool val)
 
template<typename T >
std::enable_if_t< std::is_floating_point< T >::value, T > lua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< std::is_floating_point< T >::value, void > lua_push (lua_State *L, T val)
 
template<typename T >
std::enable_if_t< std::is_integral< T >::value &&!std::is_same< T, bool >::value, T > lua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< std::is_integral< T >::value &&!std::is_same< T, bool >::value, void > lua_push (lua_State *L, T val)
 
template<typename T >
std::enable_if_t< is_pair< T >::value &&!std::is_const< typename T::first_type >::value, T > lua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< is_pair< T >::value &&!std::is_const< typename T::first_type >::value, void > lua_push (lua_State *L, const T &val)
 
template<typename T >
std::enable_if_t< is_container< T >::value &&!std::is_same< T, std::string >::value, T > lua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< is_container< T >::value &&!std::is_same< T, std::string >::value &&!is_map< T >::value, void > lua_push (lua_State *L, const T &list)
 
template<typename T >
std::enable_if_t< is_map< T >::value, void > lua_push (lua_State *L, const T &map)
 

Typedef Documentation

◆ remove_constref

template<typename T >
using lua_check_impl::remove_constref = typedef std::remove_const_t<std::remove_reference_t<std::remove_const_t<T> >>

Definition at line 72 of file push_check.hpp.

Function Documentation

◆ lua_check() [1/10]

template<typename T >
std::enable_if_t<std::is_same<T, std::string>::value, std::string> lua_check_impl::lua_check ( lua_State L,
int  n 
)

Definition at line 77 of file push_check.hpp.

References luaL_checkstring.

Referenced by lua_check().

◆ lua_check() [2/10]

template<typename T >
std::enable_if_t<std::is_same<T, config>::value, config> lua_check_impl::lua_check ( lua_State L,
int  n 
)

Definition at line 91 of file push_check.hpp.

References luaW_checkconfig().

◆ lua_check() [3/10]

template<typename T >
std::enable_if_t<std::is_same<T, map_location>::value, map_location> lua_check_impl::lua_check ( lua_State L,
int  n 
)

Definition at line 105 of file push_check.hpp.

References luaW_checklocation().

◆ lua_check() [4/10]

template<typename T >
std::enable_if_t<std::is_base_of<enum_tag, T>::value, T> lua_check_impl::lua_check ( lua_State L,
int  n 
)

Definition at line 119 of file push_check.hpp.

References luaL_argerror(), n, and name.

◆ lua_check() [5/10]

template<typename T >
std::enable_if_t<std::is_same<T, t_string>::value, t_string> lua_check_impl::lua_check ( lua_State L,
int  n 
)

Definition at line 139 of file push_check.hpp.

References luaW_checktstring().

◆ lua_check() [6/10]

template<typename T >
std::enable_if_t<std::is_same<T, bool>::value, bool> lua_check_impl::lua_check ( lua_State L,
int  n 
)

Definition at line 153 of file push_check.hpp.

References luaW_toboolean().

◆ lua_check() [7/10]

template<typename T >
std::enable_if_t<std::is_floating_point<T>::value, T> lua_check_impl::lua_check ( lua_State L,
int  n 
)

Definition at line 167 of file push_check.hpp.

References luaL_checknumber().

◆ lua_check() [8/10]

template<typename T >
std::enable_if_t<std::is_integral<T>::value && !std::is_same<T, bool>::value, T> lua_check_impl::lua_check ( lua_State L,
int  n 
)

Definition at line 181 of file push_check.hpp.

References luaL_checkinteger().

◆ lua_check() [9/10]

template<typename T >
std::enable_if_t<is_pair<T>::value && !std::is_const<typename T::first_type>::value, T> lua_check_impl::lua_check ( lua_State L,
int  n 
)

Definition at line 197 of file push_check.hpp.

References lua_istable, lua_pop, and lua_rawgeti().

◆ lua_check() [10/10]

template<typename T >
std::enable_if_t<is_container<T>::value && !std::is_same<T, std::string>::value, T> lua_check_impl::lua_check ( lua_State L,
int  n 
)

Definition at line 223 of file push_check.hpp.

References i, lua_check(), lua_istable, lua_pop, lua_rawgeti(), lua_rawlen(), and luaL_argerror().

◆ lua_push() [1/11]

template<typename T >
std::enable_if_t<std::is_same<T, std::string>::value, void> lua_check_impl::lua_push ( lua_State L,
const T &  val 
)

Definition at line 83 of file push_check.hpp.

References lua_pushlstring().

Referenced by lua_push().

◆ lua_push() [2/11]

template<typename T >
std::enable_if_t<std::is_same<T, config>::value, void> lua_check_impl::lua_push ( lua_State L,
const config val 
)

Definition at line 97 of file push_check.hpp.

References luaW_pushconfig().

◆ lua_push() [3/11]

template<typename T >
std::enable_if_t<std::is_same<T, map_location>::value, void> lua_check_impl::lua_push ( lua_State L,
const map_location val 
)

Definition at line 111 of file push_check.hpp.

References luaW_pushlocation().

◆ lua_push() [4/11]

template<typename T >
std::enable_if_t<std::is_base_of<enum_tag, T>::value, void> lua_check_impl::lua_push ( lua_State L,
val 
)

Definition at line 131 of file push_check.hpp.

References lua_push().

◆ lua_push() [5/11]

template<typename T >
std::enable_if_t<std::is_same<T, t_string>::value, void> lua_check_impl::lua_push ( lua_State L,
const t_string val 
)

Definition at line 145 of file push_check.hpp.

References luaW_pushtstring().

◆ lua_push() [6/11]

template<typename T >
std::enable_if_t<std::is_same<T, bool>::value, void> lua_check_impl::lua_push ( lua_State L,
bool  val 
)

Definition at line 159 of file push_check.hpp.

References lua_pushboolean().

◆ lua_push() [7/11]

template<typename T >
std::enable_if_t<std::is_floating_point<T>::value, void> lua_check_impl::lua_push ( lua_State L,
val 
)

Definition at line 173 of file push_check.hpp.

References lua_pushnumber().

◆ lua_push() [8/11]

template<typename T >
std::enable_if_t<std::is_integral<T>::value && !std::is_same<T, bool>::value, void> lua_check_impl::lua_push ( lua_State L,
val 
)

Definition at line 188 of file push_check.hpp.

References lua_pushnumber().

◆ lua_push() [9/11]

template<typename T >
std::enable_if_t<is_pair<T>::value && !std::is_const<typename T::first_type>::value, void> lua_check_impl::lua_push ( lua_State L,
const T &  val 
)

Definition at line 211 of file push_check.hpp.

References lua_newtable, and lua_rawseti().

◆ lua_push() [10/11]

template<typename T >
std::enable_if_t< is_container<T>::value && !std::is_same<T, std::string>::value && !is_map<T>::value , void > lua_check_impl::lua_push ( lua_State L,
const T &  list 
)

Definition at line 256 of file push_check.hpp.

References i, lua_createtable(), and lua_rawseti().

◆ lua_push() [11/11]

template<typename T >
std::enable_if_t<is_map<T>::value, void> lua_check_impl::lua_push ( lua_State L,
const T &  map 
)

Definition at line 272 of file push_check.hpp.

References lua_newtable, and lua_settable().