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

Public Member Functions | |
| temporary_unit_placer (unit_map &m, const map_location &loc, unit &u) | |
| virtual | ~temporary_unit_placer () |
Private Attributes | |
| unit_map & | m_ |
| const map_location | loc_ |
| unit * | temp_ |
This object is used to temporary place 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 557 of file unit.hpp.
| temporary_unit_placer::temporary_unit_placer | ( | unit_map & | m, | |
| const map_location & | loc, | |||
| unit & | u | |||
| ) |
Definition at line 3098 of file unit.cpp.
References unit_map::add(), and unit::clone().

| temporary_unit_placer::~temporary_unit_placer | ( | ) | [virtual] |
Definition at line 3105 of file unit.cpp.
References unit_map::erase(), unit_map::insert(), loc_, m_, and temp_.

const map_location temporary_unit_placer::loc_ [private] |
Definition at line 564 of file unit.hpp.
Referenced by ~temporary_unit_placer().
unit_map& temporary_unit_placer::m_ [private] |
Definition at line 563 of file unit.hpp.
Referenced by ~temporary_unit_placer().
unit* temporary_unit_placer::temp_ [private] |
Definition at line 565 of file unit.hpp.
Referenced by ~temporary_unit_placer().
| Generated by doxygen 1.7.1 on Fri May 25 2012 01:14:33 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |