The Battle for Wesnoth  1.19.7+dev
Classes | Functions | Variables
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, lua_index_raw >, void > lua_push (lua_State *L, lua_index_raw n)
 
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, vconfig >, vconfiglua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, vconfig >, vconfiglua_to_or_default (lua_State *L, int n, const T &def)
 
template<typename T >
std::enable_if_t< std::is_same_v< T, vconfig >, void > lua_push (lua_State *L, const vconfig &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)
 
template<typename T >
std::enable_if_t< is_instance_of_v< T, utils::optional >, T > lua_check (lua_State *L, int n)
 
template<typename T >
std::enable_if_t< is_instance_of_v< T, utils::optional >, void > lua_push (lua_State *L, const T &opt)
 

Variables

template<class T , template< class > class U>
constexpr bool is_instance_of_v = std::false_type{}
 
template<template< class > class U, class V >
constexpr bool is_instance_of_v< U< V >, U > = std::true_type{}
 

Function Documentation

◆ lua_check() [1/14]

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

References n.

Referenced by lua_check().

◆ lua_check() [2/14]

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

References n.

◆ lua_check() [3/14]

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

References luaW_tostring(), and n.

◆ lua_check() [4/14]

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

References luaW_checkconfig(), and n.

◆ lua_check() [5/14]

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

Definition at line 155 of file push_check.hpp.

References luaW_checkvconfig(), and n.

◆ lua_check() [6/14]

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

References luaW_checklocation(), and n.

◆ lua_check() [7/14]

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

References luaW_checktstring(), and n.

◆ lua_check() [8/14]

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

References luaW_toboolean(), and n.

◆ lua_check() [9/14]

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

References n.

◆ lua_check() [10/14]

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

References n.

◆ lua_check() [11/14]

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

References n.

◆ lua_check() [12/14]

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

References i, lua_check(), and n.

◆ lua_check() [13/14]

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

Definition at line 377 of file push_check.hpp.

References n.

◆ lua_check() [14/14]

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

Definition at line 390 of file push_check.hpp.

References n.

◆ lua_push() [1/15]

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

◆ lua_push() [2/15]

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

References luaW_pushconfig().

◆ lua_push() [3/15]

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

References luaW_pushlocation().

◆ lua_push() [4/15]

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

References i.

◆ lua_push() [5/15]

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

◆ lua_push() [6/15]

template<typename T >
std::enable_if_t<is_instance_of_v<T, utils::optional>, void> lua_check_impl::lua_push ( lua_State *  L,
const T &  opt 
)

Definition at line 400 of file push_check.hpp.

◆ lua_push() [7/15]

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

◆ lua_push() [8/15]

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

◆ lua_push() [9/15]

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

◆ lua_push() [10/15]

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

References luaW_pushtstring().

◆ lua_push() [11/15]

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

Definition at line 168 of file push_check.hpp.

References luaW_pushvconfig().

◆ lua_push() [12/15]

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

References luaW_pushwidget().

◆ lua_push() [13/15]

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

Definition at line 86 of file push_check.hpp.

References n.

◆ lua_push() [14/15]

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

◆ lua_push() [15/15]

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

◆ lua_to_or_default() [1/9]

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

References n.

◆ lua_to_or_default() [2/9]

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

References luaW_toboolean(), and n.

◆ lua_to_or_default() [3/9]

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

References n.

◆ lua_to_or_default() [4/9]

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

References luaW_tostring_or_default(), and n.

◆ lua_to_or_default() [5/9]

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

References luaW_toconfig(), and n.

◆ lua_to_or_default() [6/9]

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

Definition at line 161 of file push_check.hpp.

References luaW_tovconfig(), n, and vconfig::unconstructed_vconfig().

◆ lua_to_or_default() [7/9]

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

References luaW_tolocation(), and n.

◆ lua_to_or_default() [8/9]

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

References d, and n.

◆ lua_to_or_default() [9/9]

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

References n.

Variable Documentation

◆ is_instance_of_v

template<class T , template< class > class U>
constexpr bool lua_check_impl::is_instance_of_v = std::false_type{}
inlineconstexpr

Definition at line 49 of file push_check.hpp.

◆ is_instance_of_v< U< V >, U >

template<template< class > class U, class V >
constexpr bool lua_check_impl::is_instance_of_v< U< V >, U > = std::true_type{}
inlineconstexpr

Definition at line 52 of file push_check.hpp.