Public Member Functions | Private Attributes

temporary_unit_mover Struct Reference

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>

Collaboration diagram for temporary_unit_mover:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 temporary_unit_mover (unit_map &m, const map_location &src, const map_location &dst)
virtual ~temporary_unit_mover ()

Private Attributes

unit_mapm_
const map_location src_
const map_location dst_
unittemp_

Detailed Description

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.


Constructor & Destructor Documentation

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

Here is the call graph for this function:

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

Here is the call graph for this function:


Member Data Documentation

Definition at line 599 of file unit.hpp.

Referenced by temporary_unit_mover(), and ~temporary_unit_mover().

Definition at line 597 of file unit.hpp.

Referenced by ~temporary_unit_mover().

Definition at line 598 of file unit.hpp.

Referenced by temporary_unit_mover(), and ~temporary_unit_mover().

Definition at line 600 of file unit.hpp.

Referenced by ~temporary_unit_mover().


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