The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ai::lua_object< T > Class Template Reference

#include <lua_object.hpp>

Inheritance diagram for ai::lua_object< T >:
Inheritance graph

Public Member Functions

 lua_object ()
 
boost::shared_ptr< T > get ()
 
void store (lua_State *L, int n)
 
- Public Member Functions inherited from ai::lua_object_base
 lua_object_base ()
 
virtual ~lua_object_base ()
 

Protected Member Functions

boost::shared_ptr< T > to_type (lua_State *, int)
 
template<>
boost::shared_ptr
< aspect_attacks_lua_filter
to_type (lua_State *L, int n)
 
template<>
boost::shared_ptr< double > to_type (lua_State *L, int n)
 
template<>
boost::shared_ptr< std::stringto_type (lua_State *L, int n)
 
template<>
boost::shared_ptr< bool > to_type (lua_State *L, int n)
 
template<>
boost::shared_ptr< intto_type (lua_State *L, int n)
 
template<>
boost::shared_ptr< std::vector
< std::string > > 
to_type (lua_State *L, int n)
 
template<>
boost::shared_ptr< configto_type (lua_State *L, int n)
 
template<>
boost::shared_ptr< terrain_filterto_type (lua_State *L, int n)
 
template<>
boost::shared_ptr< std::vector
< target > > 
to_type (lua_State *L, int n)
 
template<>
boost::shared_ptr
< unit_advancements_aspect
to_type (lua_State *L, int n)
 
template<>
boost::shared_ptr
< aspect_attacks_lua_filter
to_type (lua_State *L, int n)
 

Protected Attributes

boost::shared_ptr< T > value_
 

Detailed Description

template<typename T>
class ai::lua_object< T >

Definition at line 54 of file lua_object.hpp.

Constructor & Destructor Documentation

template<typename T >
ai::lua_object< T >::lua_object ( )
inline

Definition at line 59 of file lua_object.hpp.

Member Function Documentation

template<typename T >
boost::shared_ptr<T> ai::lua_object< T >::get ( )
inline

Definition at line 65 of file lua_object.hpp.

References ai::lua_object< T >::value_.

template<typename T >
void ai::lua_object< T >::store ( lua_State L,
int  n 
)
inlinevirtual
template<typename T >
boost::shared_ptr<T> ai::lua_object< T >::to_type ( lua_State ,
int   
)
inlineprotected

Definition at line 78 of file lua_object.hpp.

Referenced by ai::lua_object< T >::store().

template<>
boost::shared_ptr< double > ai::lua_object< double >::to_type ( lua_State L,
int  n 
)
inlineprotected

Definition at line 87 of file lua_object.hpp.

References lua_tonumber.

template<>
boost::shared_ptr< std::string > ai::lua_object< std::string >::to_type ( lua_State L,
int  n 
)
inlineprotected

Definition at line 93 of file lua_object.hpp.

References lua_tostring.

template<>
boost::shared_ptr< bool > ai::lua_object< bool >::to_type ( lua_State L,
int  n 
)
inlineprotected

Definition at line 99 of file lua_object.hpp.

References luaW_toboolean().

template<>
boost::shared_ptr< int > ai::lua_object< int >::to_type ( lua_State L,
int  n 
)
inlineprotected

Definition at line 105 of file lua_object.hpp.

References int(), and lua_tointeger.

template<>
boost::shared_ptr< std::vector< std::string > > ai::lua_object< std::vector< std::string > >::to_type ( lua_State L,
int  n 
)
inlineprotected

Definition at line 111 of file lua_object.hpp.

References i, lua_gettable(), lua_pushinteger(), lua_rawlen(), lua_settop(), and lua_tostring.

template<>
boost::shared_ptr< config > ai::lua_object< config >::to_type ( lua_State L,
int  n 
)
inlineprotected

Definition at line 128 of file lua_object.hpp.

References luaW_toconfig().

template<>
boost::shared_ptr< terrain_filter > ai::lua_object< terrain_filter >::to_type ( lua_State L,
int  n 
)
inlineprotected

Definition at line 136 of file lua_object.hpp.

References resources::filter_con, and luaW_tovconfig().

template<>
boost::shared_ptr< std::vector< target > > ai::lua_object< std::vector< target > >::to_type ( lua_State L,
int  n 
)
inlineprotected
template<>
boost::shared_ptr< unit_advancements_aspect > ai::lua_object< unit_advancements_aspect >::to_type ( lua_State L,
int  n 
)
inlineprotected

Definition at line 198 of file lua_object.hpp.

Member Data Documentation

template<typename T >
boost::shared_ptr<T> ai::lua_object< T >::value_
protected

Definition at line 83 of file lua_object.hpp.

Referenced by ai::lua_object< T >::get(), and ai::lua_object< T >::store().


The documentation for this class was generated from the following file: