temporary_unit_placer Struct Reference

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>

Collaboration diagram for temporary_unit_placer:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 temporary_unit_placer (unit_map &m, const gamemap::location &loc, const unit &u)
 ~temporary_unit_placer ()

Private Attributes

unit_mapm_
const gamemap::locationloc_
std::pair< gamemap::location,
unit > * 
temp_


Detailed Description

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 470 of file unit.hpp.


Constructor & Destructor Documentation

temporary_unit_placer::temporary_unit_placer ( unit_map m,
const gamemap::location loc,
const unit u 
)

Definition at line 2921 of file unit.cpp.

References unit_map::add().

temporary_unit_placer::~temporary_unit_placer (  ) 

Definition at line 2927 of file unit.cpp.

References unit_map::add(), unit_map::erase(), loc_, m_, and temp_.


Member Data Documentation

Definition at line 476 of file unit.hpp.

Referenced by ~temporary_unit_placer().

Definition at line 477 of file unit.hpp.

Referenced by ~temporary_unit_placer().

Definition at line 478 of file unit.hpp.

Referenced by ~temporary_unit_placer().


The documentation for this struct was generated from the following files:

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs