This object is used to temporary move a unit in the unit map, swapping out any unit that is already there. More...
#include <unit.hpp>

Public Member Functions | |
| temporary_unit_mover (unit_map &m, const map_location &src, const map_location &dst) | |
| virtual | ~temporary_unit_mover () |
Private Attributes | |
| unit_map & | m_ |
| const map_location | src_ |
| const map_location | dst_ |
| unit * | temp_ |
This object is used to temporary move a unit in the unit map, swapping out any unit that is already there.
On destruction, it restores the unit map to its original.
Definition at line 591 of file unit.hpp.
| temporary_unit_mover::temporary_unit_mover | ( | unit_map & | m, | |
| const map_location & | src, | |||
| const map_location & | dst | |||
| ) |
Definition at line 3125 of file unit.cpp.
References dst_, unit_map::move(), and src_.

| temporary_unit_mover::~temporary_unit_mover | ( | ) | [virtual] |
Definition at line 3131 of file unit.cpp.
References dst_, unit_map::insert(), m_, unit_map::move(), src_, and temp_.

const map_location temporary_unit_mover::dst_ [private] |
Definition at line 599 of file unit.hpp.
Referenced by temporary_unit_mover(), and ~temporary_unit_mover().
unit_map& temporary_unit_mover::m_ [private] |
Definition at line 597 of file unit.hpp.
Referenced by ~temporary_unit_mover().
const map_location temporary_unit_mover::src_ [private] |
Definition at line 598 of file unit.hpp.
Referenced by temporary_unit_mover(), and ~temporary_unit_mover().
unit* temporary_unit_mover::temp_ [private] |
Definition at line 600 of file unit.hpp.
Referenced by ~temporary_unit_mover().
| Generated by doxygen 1.7.1 on Fri May 25 2012 01:14:33 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |