Public Member Functions | Private Member Functions | Private Attributes

lua_unit Class Reference

Storage for a unit, either owned by the Lua code (ptr != 0), on a recall list (side != 0), or on the map. More...

#include <lua_api.hpp>

Collaboration diagram for lua_unit:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 lua_unit (size_t u)
 lua_unit (unit *u)
 lua_unit (int s, size_t u)
 ~lua_unit ()
bool on_map () const
int on_recall_list () const
unitget ()

Private Member Functions

 lua_unit (lua_unit const &)

Private Attributes

size_t uid
unitptr
int side

Detailed Description

Storage for a unit, either owned by the Lua code (ptr != 0), on a recall list (side != 0), or on the map.

Shared units are represented by their underlying ID (uid).

Definition at line 37 of file lua_api.hpp.


Constructor & Destructor Documentation

lua_unit::lua_unit ( lua_unit const &   )  [private]
lua_unit::lua_unit ( size_t  u  )  [inline]

Definition at line 45 of file lua_api.hpp.

lua_unit::lua_unit ( unit u  )  [inline]

Definition at line 46 of file lua_api.hpp.

lua_unit::lua_unit ( int  s,
size_t  u 
) [inline]

Definition at line 47 of file lua_api.hpp.

lua_unit::~lua_unit (  ) 

Definition at line 533 of file lua.cpp.

References ptr.


Member Function Documentation

unit * lua_unit::get (  ) 

Definition at line 538 of file lua.cpp.

References unit_map::find(), ptr, side, resources::teams, uid, unit::underlying_id(), resources::units, and unit_map::iterator_base< iter_types >::valid().

Referenced by impl_unit_get(), impl_unit_set(), intf_extract_unit(), intf_match_unit(), intf_put_recall_unit(), intf_put_unit(), and luaW_tounit().

Here is the call graph for this function:

Here is the caller graph for this function:

bool lua_unit::on_map (  )  const [inline]

Definition at line 49 of file lua_api.hpp.

References ptr, and side.

Referenced by impl_unit_get(), impl_unit_set(), intf_extract_unit(), intf_put_recall_unit(), intf_put_unit(), and luaW_tounit().

Here is the caller graph for this function:

int lua_unit::on_recall_list (  )  const [inline]

Definition at line 50 of file lua_api.hpp.

References side.

Referenced by impl_unit_get(), intf_extract_unit(), intf_match_unit(), intf_put_recall_unit(), and intf_put_unit().

Here is the caller graph for this function:


Member Data Documentation

unit* lua_unit::ptr [private]

Definition at line 40 of file lua_api.hpp.

Referenced by get(), on_map(), and ~lua_unit().

int lua_unit::side [private]

Definition at line 41 of file lua_api.hpp.

Referenced by get(), on_map(), and on_recall_list().

size_t lua_unit::uid [private]

Definition at line 39 of file lua_api.hpp.

Referenced by get().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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