The Battle for Wesnoth  1.15.2+dev
Public Types | Public Member Functions | Private Attributes | List of all members
display::rect_of_hexes::iterator Struct Reference

very simple iterator to walk into the rect_of_hexes More...

#include <display.hpp>

Public Types

typedef std::forward_iterator_tag iterator_category
 
typedef map_location value_type
 
typedef int difference_type
 
typedef const map_locationpointer
 
typedef const map_locationreference
 

Public Member Functions

 iterator (const map_location &loc, const rect_of_hexes &rect)
 
iteratoroperator++ ()
 increment y first, then when reaching bottom, increment x More...
 
bool operator== (const iterator &that) const
 
bool operator!= (const iterator &that) const
 
const map_locationoperator* () const
 

Private Attributes

map_location loc_
 
const rect_of_hexesrect_
 

Detailed Description

very simple iterator to walk into the rect_of_hexes

Definition at line 308 of file display.hpp.

Member Typedef Documentation

◆ difference_type

Definition at line 320 of file display.hpp.

◆ iterator_category

typedef std::forward_iterator_tag display::rect_of_hexes::iterator::iterator_category

Definition at line 318 of file display.hpp.

◆ pointer

Definition at line 321 of file display.hpp.

◆ reference

Definition at line 322 of file display.hpp.

◆ value_type

Definition at line 319 of file display.hpp.

Constructor & Destructor Documentation

◆ iterator()

display::rect_of_hexes::iterator::iterator ( const map_location loc,
const rect_of_hexes rect 
)
inline

Definition at line 309 of file display.hpp.

Member Function Documentation

◆ operator!=()

bool display::rect_of_hexes::iterator::operator!= ( const iterator that) const
inline

Definition at line 315 of file display.hpp.

References loc_, and loc_.

◆ operator*()

const map_location& display::rect_of_hexes::iterator::operator* ( ) const
inline

Definition at line 316 of file display.hpp.

References loc_.

◆ operator++()

display::rect_of_hexes::iterator & display::rect_of_hexes::iterator::operator++ ( )

increment y first, then when reaching bottom, increment x

Definition at line 660 of file display.cpp.

References loc_, map_location::x, and map_location::y.

◆ operator==()

bool display::rect_of_hexes::iterator::operator== ( const iterator that) const
inline

Definition at line 314 of file display.hpp.

References loc_, and loc_.

Member Data Documentation

◆ loc_

map_location display::rect_of_hexes::iterator::loc_
private

Definition at line 325 of file display.hpp.

Referenced by operator!=(), and operator==().

◆ rect_

const rect_of_hexes& display::rect_of_hexes::iterator::rect_
private

Definition at line 326 of file display.hpp.


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