The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Namespaces | Classes | Functions
lua_check_impl Namespace Reference

Namespaces

 detail
 

Classes

struct  is_container
 
struct  is_container< T & >
 
struct  is_map
 
struct  is_map< T & >
 
struct  is_pair
 
struct  remove_constref
 

Functions

template<typename T >
boost::enable_if< typename
boost::is_same< T, std::string >
::type, std::string >::type 
lua_check (lua_State *L, int n)
 
template<typename T >
boost::enable_if< typename
boost::is_same< T, std::string >
::type, void >::type 
lua_push (lua_State *L, const T &val)
 
template<typename T >
boost::enable_if< typename
boost::is_same< T, config >
::type, config >::type 
lua_check (lua_State *L, int n)
 
template<typename T >
boost::enable_if< typename
boost::is_same< T, config >
::type, void >::type 
lua_push (lua_State *L, const config &val)
 
template<typename T >
boost::enable_if< typename
boost::is_same< T,
map_location >::type,
map_location >::type 
lua_check (lua_State *L, int n)
 
template<typename T >
boost::enable_if< typename
boost::is_same< T,
map_location >::type, void >
::type 
lua_push (lua_State *L, const map_location &val)
 
template<typename T >
boost::enable_if
< boost::is_base_of< enum_tag,
T >, T >::type 
lua_check (lua_State *L, int n)
 
template<typename T >
boost::enable_if
< boost::is_base_of< enum_tag,
T >, void >::type 
lua_push (lua_State *L, T val)
 
template<typename T >
boost::enable_if< typename
boost::is_same< T, t_string >
::type, t_string >::type 
lua_check (lua_State *L, int n)
 
template<typename T >
boost::enable_if< typename
boost::is_same< T, t_string >
::type, void >::type 
lua_push (lua_State *L, const t_string &val)
 
template<typename T >
boost::enable_if< typename
boost::is_same< T, bool >
::type, bool >::type 
lua_check (lua_State *L, int n)
 
template<typename T >
boost::enable_if< typename
boost::is_same< T, bool >
::type, void >::type 
lua_push (lua_State *L, bool val)
 
template<typename T >
boost::enable_if
< boost::is_float< T >, T >
::type 
lua_check (lua_State *L, int n)
 
template<typename T >
boost::enable_if
< boost::is_float< T >, void >
::type 
lua_push (lua_State *L, T val)
 
template<typename T >
boost::enable_if
< boost::mpl::and_
< boost::is_integral< T >
, boost::mpl::not_< typename
boost::is_same< T, bool >
::type > >, T >::type 
lua_check (lua_State *L, int n)
 
template<typename T >
boost::enable_if
< boost::mpl::and_
< boost::is_integral< T >
, boost::mpl::not_< typename
boost::is_same< T, bool >
::type > >, void >::type 
lua_push (lua_State *L, T val)
 
template<typename T >
boost::enable_if< typename
boost::mpl::and_< typename
is_pair< T >::type, typename
boost::mpl::not_< typename
boost::is_const< typename
T::first_type > >::type >
::type, T >::type 
lua_check (lua_State *L, int n)
 
template<typename T >
boost::enable_if< typename
boost::mpl::and_< typename
is_pair< T >::type, typename
boost::mpl::not_< typename
boost::is_const< typename
T::first_type > >::type >
::type, void >::type 
lua_push (lua_State *L, const T &val)
 
template<typename T >
boost::enable_if< typename
boost::mpl::and_< typename
is_container< T >::type,
typename boost::mpl::not_
< typename boost::is_same< T,
std::string > >::type >::type,
T >::type 
lua_check (lua_State *L, int n)
 
template<typename T >
boost::enable_if< typename
boost::mpl::and_< typename
is_container< T >::type,
typename boost::mpl::not_
< typename boost::is_same< T,
std::string > >::type,
typename boost::mpl::not_
< typename is_map< T >::type >
::type >::type, void >::type 
lua_push (lua_State *L, const T &list)
 
template<typename T >
boost::enable_if< typename
is_map< T >::type, void >
::type 
lua_push (lua_State *L, const T &map)
 

Function Documentation

template<typename T >
boost::enable_if<typename boost::is_same<T, std::string>::type, std::string>::type lua_check_impl::lua_check ( lua_State L,
int  n 
)

Definition at line 76 of file push_check.hpp.

References luaL_checkstring.

Referenced by lua_check().

template<typename T >
boost::enable_if<typename boost::is_same<T, config>::type, config>::type lua_check_impl::lua_check ( lua_State L,
int  n 
)

Definition at line 88 of file push_check.hpp.

References luaW_checkconfig().

template<typename T >
boost::enable_if<typename boost::is_same<T, map_location>::type, map_location>::type lua_check_impl::lua_check ( lua_State L,
int  n 
)

Definition at line 100 of file push_check.hpp.

References luaW_checklocation().

template<typename T >
boost::enable_if<boost::is_base_of<enum_tag, T>, T>::type lua_check_impl::lua_check ( lua_State L,
int  n 
)

Definition at line 112 of file push_check.hpp.

References luaL_argerror().

template<typename T >
boost::enable_if<typename boost::is_same<T, t_string>::type, t_string>::type lua_check_impl::lua_check ( lua_State L,
int  n 
)

Definition at line 130 of file push_check.hpp.

References luaW_checktstring().

template<typename T >
boost::enable_if<typename boost::is_same<T, bool>::type, bool>::type lua_check_impl::lua_check ( lua_State L,
int  n 
)

Definition at line 142 of file push_check.hpp.

References luaW_toboolean().

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

Definition at line 154 of file push_check.hpp.

References luaL_checknumber().

template<typename T >
boost::enable_if< boost::mpl::and_< boost::is_integral<T>, boost::mpl::not_<typename boost::is_same<T, bool>::type> >, T >::type lua_check_impl::lua_check ( lua_State L,
int  n 
)

Definition at line 172 of file push_check.hpp.

References luaL_checkinteger().

template<typename T >
boost::enable_if< typename boost::mpl::and_< typename is_pair<T>::type, typename boost::mpl::not_<typename boost::is_const<typename T::first_type> >::type >::type, T >::type 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 >
boost::enable_if< typename boost::mpl::and_< typename is_container<T>::type, typename boost::mpl::not_<typename boost::is_same<T, std::string> >::type >::type, T >::type lua_check_impl::lua_check ( lua_State L,
int  n 
)

Definition at line 237 of file push_check.hpp.

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

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

Definition at line 81 of file push_check.hpp.

References lua_pushlstring().

Referenced by lua_push().

template<typename T >
boost::enable_if<typename boost::is_same<T, config>::type, void>::type lua_check_impl::lua_push ( lua_State L,
const config val 
)

Definition at line 93 of file push_check.hpp.

References luaW_pushconfig().

template<typename T >
boost::enable_if<typename boost::is_same<T, map_location>::type, void>::type lua_check_impl::lua_push ( lua_State L,
const map_location val 
)

Definition at line 105 of file push_check.hpp.

References luaW_pushlocation().

template<typename T >
boost::enable_if<boost::is_base_of<enum_tag, T>, void>::type lua_check_impl::lua_push ( lua_State L,
val 
)

Definition at line 123 of file push_check.hpp.

References lua_push().

template<typename T >
boost::enable_if<typename boost::is_same<T, t_string>::type, void>::type lua_check_impl::lua_push ( lua_State L,
const t_string val 
)

Definition at line 135 of file push_check.hpp.

References luaW_pushtstring().

template<typename T >
boost::enable_if<typename boost::is_same<T, bool>::type, void>::type lua_check_impl::lua_push ( lua_State L,
bool  val 
)

Definition at line 147 of file push_check.hpp.

References lua_pushboolean().

template<typename T >
boost::enable_if<boost::is_float<T>, void>::type lua_check_impl::lua_push ( lua_State L,
val 
)

Definition at line 159 of file push_check.hpp.

References lua_pushnumber().

template<typename T >
boost::enable_if< boost::mpl::and_< boost::is_integral<T>, boost::mpl::not_<typename boost::is_same<T, bool>::type> >, void >::type lua_check_impl::lua_push ( lua_State L,
val 
)

Definition at line 184 of file push_check.hpp.

References lua_pushnumber().

template<typename T >
boost::enable_if< typename boost::mpl::and_< typename is_pair<T>::type, typename boost::mpl::not_<typename boost::is_const<typename T::first_type> >::type >::type, void >::type lua_check_impl::lua_push ( lua_State L,
const T &  val 
)

Definition at line 219 of file push_check.hpp.

References lua_newtable, and lua_rawseti().

template<typename T >
boost::enable_if< typename boost::mpl::and_< typename is_container<T>::type, typename boost::mpl::not_<typename boost::is_same<T, std::string> >::type, typename boost::mpl::not_<typename is_map<T>::type >::type >::type, void >::type lua_check_impl::lua_push ( lua_State L,
const T &  list 
)

Definition at line 274 of file push_check.hpp.

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

template<typename T >
boost::enable_if< typename is_map<T>::type, void >::type lua_check_impl::lua_push ( lua_State L,
const T &  map 
)

Definition at line 293 of file push_check.hpp.

References lua_newtable, and lua_settable().