unit_map::xy_accessor Struct Reference

Used to access the unit at a given position. More...

#include <unit_map.hpp>

Collaboration diagram for unit_map::xy_accessor:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 xy_accessor (const unit_iterator &i)
 xy_accessor (const unit_xy_iterator &i)
 xy_accessor ()
std::pair< gamemap::location,
unit > * 
operator-> ()
std::pair< gamemap::location,
unit > & 
operator* ()
bool valid ()

Private Attributes

iterator_counter counter
umap::iterator i_
unit_mapmap_
gamemap::location loc_


Detailed Description

Used to access the unit at a given position.

Is valid as long as any unit is in that position. Can switch from invalid to valid.

Definition at line 264 of file unit_map.hpp.


Constructor & Destructor Documentation

unit_map::xy_accessor::xy_accessor ( const unit_iterator i  ) 

Definition at line 261 of file unit_map.cpp.

References loc_, and unit_map::unit_iterator::valid().

unit_map::xy_accessor::xy_accessor ( const unit_xy_iterator i  ) 

Definition at line 265 of file unit_map.cpp.

References loc_, and unit_map::unit_xy_iterator::valid().

unit_map::xy_accessor::xy_accessor (  )  [inline]

Definition at line 268 of file unit_map.hpp.


Member Function Documentation

std::pair< gamemap::location, unit > * unit_map::xy_accessor::operator-> (  ) 

Definition at line 270 of file unit_map.cpp.

References i_, and valid().

std::pair< gamemap::location, unit > & unit_map::xy_accessor::operator* (  ) 

Definition at line 275 of file unit_map.cpp.

References i_, and valid().

bool unit_map::xy_accessor::valid (  ) 


Member Data Documentation

Definition at line 276 of file unit_map.hpp.

umap::iterator unit_map::xy_accessor::i_ [private]

Definition at line 278 of file unit_map.hpp.

Referenced by operator*(), operator->(), and valid().

Definition at line 279 of file unit_map.hpp.

Referenced by valid().

Definition at line 281 of file unit_map.hpp.

Referenced by valid(), and xy_accessor().


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