Public Member Functions | Protected Member Functions | Protected Attributes

ai::lua_object< T > Class Template Reference

#include <lua_object.hpp>

Inheritance diagram for ai::lua_object< T >:
Inheritance graph
[legend]
Collaboration diagram for ai::lua_object< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 lua_object ()
boost::shared_ptr< T > get ()
void store (lua_State *L, int n)

Protected Member Functions

boost::shared_ptr< T > to_type (lua_State *, int)
template<>
boost::shared_ptr< double > to_type (lua_State *L, int n)
template<>
boost::shared_ptr< std::string > to_type (lua_State *L, int n)
template<>
boost::shared_ptr< bool > to_type (lua_State *L, int n)
template<>
boost::shared_ptr< int > to_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)

Protected Attributes

boost::shared_ptr< T > value_

Detailed Description

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

Definition at line 49 of file lua_object.hpp.


Constructor & Destructor Documentation

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

Definition at line 54 of file lua_object.hpp.


Member Function Documentation

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

Definition at line 60 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 
) [inline, virtual]

Implements ai::lua_object_base.

Definition at line 65 of file lua_object.hpp.

References ai::lua_object< T >::to_type(), and ai::lua_object< T >::value_.

Here is the call graph for this function:

template<>
boost::shared_ptr< terrain_filter > ai::lua_object< terrain_filter >::to_type ( lua_State L,
int  n 
) [inline, protected]

Definition at line 140 of file lua_object.hpp.

References luaW_tovconfig(), and resources::units.

Here is the call graph for this function:

template<>
boost::shared_ptr< config > ai::lua_object< config >::to_type ( lua_State L,
int  n 
) [inline, protected]

Definition at line 132 of file lua_object.hpp.

References luaW_toconfig().

Here is the call graph for this function:

template<>
boost::shared_ptr< std::vector< std::string > > ai::lua_object< std::vector< std::string > >::to_type ( lua_State L,
int  n 
) [inline, protected]

Definition at line 115 of file lua_object.hpp.

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

Here is the call graph for this function:

template<>
boost::shared_ptr< int > ai::lua_object< int >::to_type ( lua_State L,
int  n 
) [inline, protected]

Definition at line 109 of file lua_object.hpp.

References lua_tointeger.

template<>
boost::shared_ptr< bool > ai::lua_object< bool >::to_type ( lua_State L,
int  n 
) [inline, protected]

Definition at line 94 of file lua_object.hpp.

References lua_toboolean().

Here is the call graph for this function:

template<>
boost::shared_ptr< std::string > ai::lua_object< std::string >::to_type ( lua_State L,
int  n 
) [inline, protected]

Definition at line 88 of file lua_object.hpp.

References lua_tostring.

template<>
boost::shared_ptr< double > ai::lua_object< double >::to_type ( lua_State L,
int  n 
) [inline, protected]

Definition at line 82 of file lua_object.hpp.

References lua_tonumber.

template<typename T >
boost::shared_ptr<T> ai::lua_object< T >::to_type ( lua_State ,
int   
) [inline, protected]

Definition at line 73 of file lua_object.hpp.

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

Here is the caller graph for this function:

template<>
boost::shared_ptr< std::vector< target > > ai::lua_object< std::vector< target > >::to_type ( lua_State L,
int  n 
) [inline, protected]

Definition at line 151 of file lua_object.hpp.

References lua_pop, lua_pushstring(), lua_rawget(), lua_rawgeti(), lua_rawlen(), lua_settop(), lua_tointeger, and type.

Here is the call graph for this function:


Member Data Documentation

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

Definition at line 78 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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:19:02 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs