The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 = utils::remove_const_t< utils::remove_reference_t< utils::remove_const_t< T >>>
 

Functions

template<typename T >
utils::enable_if_t
< std::is_same< T, std::string >
::value, std::string > 
lua_check (lua_State *L, int n)
 
template<typename T >
utils::enable_if_t
< std::is_same< T, std::string >
::value, void > 
lua_push (lua_State *L, const T &val)
 
template<typename T >
utils::enable_if_t
< std::is_same< T, config >
::value, config
lua_check (lua_State *L, int n)
 
template<typename T >
utils::enable_if_t
< std::is_same< T, config >
::value, void > 
lua_push (lua_State *L, const config &val)
 
template<typename T >
utils::enable_if_t
< std::is_same< T,
map_location >::value,
map_location
lua_check (lua_State *L, int n)
 
template<typename T >
utils::enable_if_t
< std::is_same< T,
map_location >::value, void > 
lua_push (lua_State *L, const map_location &val)
 
template<typename T >
utils::enable_if_t
< std::is_base_of< enum_tag, T >
::value, T > 
lua_check (lua_State *L, int n)
 
template<typename T >
utils::enable_if_t
< std::is_base_of< enum_tag, T >
::value, void > 
lua_push (lua_State *L, T val)
 
template<typename T >
utils::enable_if_t
< std::is_same< T, t_string >
::value, t_string
lua_check (lua_State *L, int n)
 
template<typename T >
utils::enable_if_t
< std::is_same< T, t_string >
::value, void > 
lua_push (lua_State *L, const t_string &val)
 
template<typename T >
utils::enable_if_t
< std::is_same< T, bool >
::value, bool > 
lua_check (lua_State *L, int n)
 
template<typename T >
utils::enable_if_t
< std::is_same< T, bool >
::value, void > 
lua_push (lua_State *L, bool val)
 
template<typename T >
utils::enable_if_t
< std::is_floating_point< T >
::value, T > 
lua_check (lua_State *L, int n)
 
template<typename T >
utils::enable_if_t
< std::is_floating_point< T >
::value, void > 
lua_push (lua_State *L, T val)
 
template<typename T >
utils::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 >
utils::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 >
utils::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 >
utils::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 >
utils::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 >
utils::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 >
utils::enable_if_t< is_map< T >
::value, void > 
lua_push (lua_State *L, const T &map)
 

Typedef Documentation

Definition at line 74 of file push_check.hpp.

Function Documentation

template<typename T >
utils::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 79 of file push_check.hpp.

References luaL_checkstring.

Referenced by lua_check().

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

Definition at line 93 of file push_check.hpp.

References luaW_checkconfig().

template<typename T >
utils::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 107 of file push_check.hpp.

References luaW_checklocation().

template<typename T >
utils::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 121 of file push_check.hpp.

References luaL_argerror(), n, and name().

template<typename T >
utils::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 141 of file push_check.hpp.

References luaW_checktstring().

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

Definition at line 155 of file push_check.hpp.

References luaW_toboolean().

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

Definition at line 169 of file push_check.hpp.

References luaL_checknumber().

template<typename T >
utils::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 183 of file push_check.hpp.

References luaL_checkinteger().

template<typename T >
utils::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 199 of file push_check.hpp.

References lua_istable, lua_pop, and lua_rawgeti().

template<typename T >
utils::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 225 of file push_check.hpp.

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

template<typename T >
utils::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 85 of file push_check.hpp.

References lua_pushlstring().

Referenced by lua_push().

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

Definition at line 99 of file push_check.hpp.

References luaW_pushconfig().

template<typename T >
utils::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 113 of file push_check.hpp.

References luaW_pushlocation().

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

Definition at line 133 of file push_check.hpp.

References lua_push().

template<typename T >
utils::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 147 of file push_check.hpp.

References luaW_pushtstring().

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

Definition at line 161 of file push_check.hpp.

References lua_pushboolean().

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

Definition at line 175 of file push_check.hpp.

References lua_pushnumber().

template<typename T >
utils::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 190 of file push_check.hpp.

References lua_pushnumber().

template<typename T >
utils::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 213 of file push_check.hpp.

References lua_newtable, and lua_rawseti().

template<typename T >
utils::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 258 of file push_check.hpp.

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

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

Definition at line 274 of file push_check.hpp.

References lua_newtable, and lua_settable().