unit_map::unit_xy_iterator Struct Reference

Similar to unit_iterator, except that becomes invalid if unit is moved while the iterator points at it. More...

#include <unit_map.hpp>

Collaboration diagram for unit_map::unit_xy_iterator:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 unit_xy_iterator (const unit_iterator &i)
 unit_xy_iterator ()
 unit_xy_iterator (const unit_xy_iterator &i)
 unit_xy_iterator (umap::iterator i, unit_map *map, gamemap::location loc)
std::pair< gamemap::location,
unit > * 
operator-> () const
std::pair< gamemap::location,
unit > & 
operator* () const
unit_xy_iterator operator++ ()
unit_xy_iterator operator++ (int)
bool operator== (const unit_xy_iterator &that) const
bool operator!= (const unit_xy_iterator &that) const
bool valid () const

Private Attributes

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

Friends

struct const_unit_xy_iterator
struct xy_accessor
struct const_xy_accessor


Detailed Description

Similar to unit_iterator, except that becomes invalid if unit is moved while the iterator points at it.

Definition at line 181 of file unit_map.hpp.


Constructor & Destructor Documentation

unit_map::unit_xy_iterator::unit_xy_iterator ( const unit_iterator i  ) 

Definition at line 148 of file unit_map.cpp.

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

unit_map::unit_xy_iterator::unit_xy_iterator (  )  [inline]

Definition at line 185 of file unit_map.hpp.

Referenced by operator++().

unit_map::unit_xy_iterator::unit_xy_iterator ( const unit_xy_iterator i  )  [inline]

Definition at line 187 of file unit_map.hpp.

References loc_, and valid().

unit_map::unit_xy_iterator::unit_xy_iterator ( umap::iterator  i,
unit_map map,
gamemap::location  loc 
) [inline]

Definition at line 190 of file unit_map.hpp.


Member Function Documentation

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

Definition at line 153 of file unit_map.cpp.

References i_, and valid().

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

Definition at line 159 of file unit_map.cpp.

References i_, and valid().

unit_map::unit_xy_iterator unit_map::unit_xy_iterator::operator++ (  ) 

Definition at line 165 of file unit_map.cpp.

References i_, loc_, unit_map::map_, map_, and valid().

unit_map::unit_xy_iterator unit_map::unit_xy_iterator::operator++ ( int   ) 

Definition at line 181 of file unit_map.cpp.

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

bool unit_map::unit_xy_iterator::operator== ( const unit_xy_iterator that  )  const [inline]

Definition at line 199 of file unit_map.hpp.

References i_.

bool unit_map::unit_xy_iterator::operator!= ( const unit_xy_iterator that  )  const [inline]

Definition at line 202 of file unit_map.hpp.

References i_.

bool unit_map::unit_xy_iterator::valid (  )  const


Friends And Related Function Documentation

friend struct const_unit_xy_iterator [friend]

Definition at line 207 of file unit_map.hpp.

friend struct xy_accessor [friend]

Definition at line 208 of file unit_map.hpp.

friend struct const_xy_accessor [friend]

Definition at line 209 of file unit_map.hpp.


Member Data Documentation

Definition at line 212 of file unit_map.hpp.

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

Definition at line 214 of file unit_map.hpp.

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

Definition at line 215 of file unit_map.hpp.

Referenced by operator++(), and valid().


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