The Battle for Wesnoth  1.19.0+dev
Classes | Functions
lua_check_impl Namespace Reference

Classes

struct  is_container
 
struct  is_container< T, std::void_t< typename std::decay_t< T >::value_type, typename std::decay_t< T >::iterator, typename std::decay_t< T >::size_type, typename std::decay_t< T >::reference > >
 
struct  is_map
 
struct  is_map< T, std::void_t< typename std::decay_t< T >::key_type, typename std::decay_t< T >::mapped_type > >
 
struct  is_pair
 
struct  is_pair< T, std::void_t< typename std::decay_t< T >::first_type, typename std::decay_t< T >::second_type > >
 

Functions

template<typename T >
std::enable_if_t< std::is_same_v< T, lua_index_raw >, lua_index_rawlua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, lua_index_raw >, lua_index_rawlua_to_or_default (lua_State *L, int n, const T &)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, std::string >, std::string > lua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, std::string >, std::string > lua_to_or_default (lua_State *L, int n, const T &def)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, std::string >, void > lua_push (lua_State *L, const T &val)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, std::string_view >, std::string_view > lua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, std::string_view >, std::string_view > lua_to_or_default (lua_State *L, int n, const T &def)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, std::string_view >, void > lua_push (lua_State *L, const T &val)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, config >, configlua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, config >, configlua_to_or_default (lua_State *L, int n, const T &def)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, config >, void > lua_push (lua_State *L, const config &val)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, map_location >, map_locationlua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, map_location >, map_locationlua_to_or_default (lua_State *L, int n, const T &def)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, map_location >, void > lua_push (lua_State *L, const map_location &val)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, t_string >, t_stringlua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, t_string >, void > lua_push (lua_State *L, const t_string &val)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, gui2::widget >, void > lua_push (lua_State *L, gui2::widget &val)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, bool >, bool > lua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, bool >, bool > lua_to_or_default (lua_State *L, int n, const T &)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, bool >, void > lua_push (lua_State *L, bool val)
 
template<typename T >
std::enable_if_t< std::is_floating_point_v< T >, T > lua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< std::is_floating_point_v< T >, T > lua_to_or_default (lua_State *L, int n, const T &def)
 
template<typename T >
std::enable_if_t< std::is_floating_point_v< T >, void > lua_push (lua_State *L, T val)
 
template<typename T >
std::enable_if_t< std::is_integral_v< T > &&!std::is_same_v< T, bool >, T > lua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< std::is_integral_v< T > &&!std::is_same_v< T, bool >, T > lua_to_or_default (lua_State *L, int n, const T &def)
 
template<typename T >
std::enable_if_t< std::is_integral_v< T > &&!std::is_same_v< T, bool >, void > lua_push (lua_State *L, T val)
 
template<typename T >
std::enable_if_t< is_pair< T >::value &&!std::is_const_v< typename T::first_type >, T > lua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< is_pair< T >::value &&!std::is_const_v< typename T::first_type >, void > lua_push (lua_State *L, const T &val)
 
template<typename T >
std::enable_if_t< is_container< T >::value &&!std::is_same_v< T, std::string > &&!std::is_same_v< T, std::string_view >, T > lua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< is_container< T >::value &&!std::is_same_v< T, std::string > &&!std::is_same_v< T, std::string_view > &&!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)
 
template<typename T >
T::type lua_check (lua_State *L, int n)
 

Function Documentation

◆ lua_check() [1/12]

template<typename T >
std::enable_if_t<std::is_same_v<T, lua_index_raw>, lua_index_raw> lua_check_impl::lua_check ( lua_State *  L,
int  n 
)

Definition at line 64 of file push_check.hpp.

References n, and UNUSED.

Referenced by lua_check().

◆ lua_check() [2/12]

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

Definition at line 80 of file push_check.hpp.

References n.

◆ lua_check() [3/12]

template<typename T >
std::enable_if_t<std::is_same_v<T, std::string_view>, std::string_view> lua_check_impl::lua_check ( lua_State *  L,
int  n 
)

Definition at line 100 of file push_check.hpp.

References luaW_tostring(), and n.

◆ lua_check() [4/12]

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

Definition at line 120 of file push_check.hpp.

References luaW_checkconfig(), and n.

◆ lua_check() [5/12]

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

Definition at line 141 of file push_check.hpp.

References luaW_checklocation(), and n.

◆ lua_check() [6/12]

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

Definition at line 165 of file push_check.hpp.

References luaW_checktstring(), and n.

◆ lua_check() [7/12]

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

Definition at line 188 of file push_check.hpp.

References luaW_toboolean(), and n.

◆ lua_check() [8/12]

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

Definition at line 208 of file push_check.hpp.

References n.

◆ lua_check() [9/12]

template<typename T >
std::enable_if_t<std::is_integral_v<T> && !std::is_same_v<T, bool>, T> lua_check_impl::lua_check ( lua_State *  L,
int  n 
)

Definition at line 233 of file push_check.hpp.

References n.

◆ lua_check() [10/12]

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

Definition at line 260 of file push_check.hpp.

References n.

◆ lua_check() [11/12]

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

Definition at line 286 of file push_check.hpp.

References i, lua_check(), and n.

◆ lua_check() [12/12]

template<typename T >
T::type lua_check_impl::lua_check ( lua_State *  L,
int  n 
)

Definition at line 341 of file push_check.hpp.

References n.

◆ lua_push() [1/12]

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

Definition at line 200 of file push_check.hpp.

◆ lua_push() [2/12]

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

Definition at line 133 of file push_check.hpp.

References luaW_pushconfig().

◆ lua_push() [3/12]

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

Definition at line 157 of file push_check.hpp.

References luaW_pushlocation().

◆ lua_push() [4/12]

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

Definition at line 312 of file push_check.hpp.

References i.

◆ lua_push() [5/12]

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 327 of file push_check.hpp.

◆ lua_push() [6/12]

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

Definition at line 92 of file push_check.hpp.

◆ lua_push() [7/12]

template<typename T >
std::enable_if_t<std::is_same_v<T, std::string_view>, void> lua_check_impl::lua_push ( lua_State *  L,
const T &  val 
)

Definition at line 112 of file push_check.hpp.

◆ lua_push() [8/12]

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

Definition at line 274 of file push_check.hpp.

◆ lua_push() [9/12]

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

Definition at line 171 of file push_check.hpp.

References luaW_pushtstring().

◆ lua_push() [10/12]

template<typename T >
std::enable_if_t<std::is_same_v<T, gui2::widget>, void> lua_check_impl::lua_push ( lua_State *  L,
gui2::widget val 
)

Definition at line 180 of file push_check.hpp.

References luaW_pushwidget().

◆ lua_push() [11/12]

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

Definition at line 225 of file push_check.hpp.

◆ lua_push() [12/12]

template<typename T >
std::enable_if_t<std::is_integral_v<T> && !std::is_same_v<T, bool>, void> lua_check_impl::lua_push ( lua_State *  L,
val 
)

Definition at line 251 of file push_check.hpp.

◆ lua_to_or_default() [1/8]

template<typename T >
std::enable_if_t<std::is_same_v<T, lua_index_raw>, lua_index_raw> lua_check_impl::lua_to_or_default ( lua_State *  L,
int  n,
const T &   
)

Definition at line 71 of file push_check.hpp.

References n, and UNUSED.

◆ lua_to_or_default() [2/8]

template<typename T >
std::enable_if_t<std::is_same_v<T, bool>, bool> lua_check_impl::lua_to_or_default ( lua_State *  L,
int  n,
const T &   
)

Definition at line 194 of file push_check.hpp.

References luaW_toboolean(), and n.

◆ lua_to_or_default() [3/8]

template<typename T >
std::enable_if_t<std::is_same_v<T, std::string>, std::string> lua_check_impl::lua_to_or_default ( lua_State *  L,
int  n,
const T &  def 
)

Definition at line 86 of file push_check.hpp.

References n.

◆ lua_to_or_default() [4/8]

template<typename T >
std::enable_if_t<std::is_same_v<T, std::string_view>, std::string_view> lua_check_impl::lua_to_or_default ( lua_State *  L,
int  n,
const T &  def 
)

Definition at line 106 of file push_check.hpp.

References luaW_tostring_or_default(), and n.

◆ lua_to_or_default() [5/8]

template<typename T >
std::enable_if_t<std::is_same_v<T, config>, config> lua_check_impl::lua_to_or_default ( lua_State *  L,
int  n,
const T &  def 
)

Definition at line 126 of file push_check.hpp.

References luaW_toconfig(), and n.

◆ lua_to_or_default() [6/8]

template<typename T >
std::enable_if_t<std::is_same_v<T, map_location>, map_location> lua_check_impl::lua_to_or_default ( lua_State *  L,
int  n,
const T &  def 
)

Definition at line 147 of file push_check.hpp.

References luaW_tolocation(), and n.

◆ lua_to_or_default() [7/8]

template<typename T >
std::enable_if_t<std::is_floating_point_v<T>, T> lua_check_impl::lua_to_or_default ( lua_State *  L,
int  n,
const T &  def 
)

Definition at line 214 of file push_check.hpp.

References d, and n.

◆ lua_to_or_default() [8/8]

template<typename T >
std::enable_if_t<std::is_integral_v<T> && !std::is_same_v<T, bool>, T> lua_check_impl::lua_to_or_default ( lua_State *  L,
int  n,
const T &  def 
)

Definition at line 239 of file push_check.hpp.

References n.