Public Member Functions | Private Attributes

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 map_location &loc, unit &u)
virtual ~temporary_unit_placer ()

Private Attributes

unit_mapm_
const map_location loc_
unittemp_

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


Constructor & Destructor Documentation

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

Here is the call graph for this function:

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_.

Here is the call graph for this function:


Member Data Documentation

Definition at line 564 of file unit.hpp.

Referenced by ~temporary_unit_placer().

Definition at line 563 of file unit.hpp.

Referenced by ~temporary_unit_placer().

Definition at line 565 of file unit.hpp.

Referenced by ~temporary_unit_placer().


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

Generated by doxygen 1.7.1 on Fri May 25 2012 01:14:33 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs