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>

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 |
| unit * | get () |
Private Member Functions | |
| lua_unit (lua_unit const &) | |
Private Attributes | |
| size_t | uid |
| unit * | ptr |
| int | side |
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.
| 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.
| 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().


| bool lua_unit::on_map | ( | ) | const [inline] |
Definition at line 49 of file lua_api.hpp.
Referenced by impl_unit_get(), impl_unit_set(), intf_extract_unit(), intf_put_recall_unit(), intf_put_unit(), and luaW_tounit().

| 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().

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().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:14:28 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |