openModeller
Version 1.5.0
Main Page
Modules
Classes
Files
File List
File Members
MapIterator.hh
Go to the documentation of this file.
1
29
#ifndef MAP_ITER_HH
30
#define MAP_ITER_HH
31
32
#include <
openmodeller/om_defs.hh
>
33
34
// For pair
35
#include <utility>
36
37
#include <
openmodeller/env_io/Header.hh
>
38
class
GeoTransform
;
39
40
class
dllexp
MapIterator
{
41
42
friend
dllexp
bool
operator ==
(
const
MapIterator
&,
const
MapIterator
& );
43
friend
dllexp
bool
operator !=
(
const
MapIterator
&,
const
MapIterator
& );
44
45
public
:
46
// Default constructor create a Terminal object which can be used in
47
// while (miter != MapIterator() {} loops.
48
MapIterator
();
49
50
MapIterator
(
const
Header
& h,
GeoTransform
* gt );
51
52
// Compiler generated copy constructor, assignment operator and destructor
53
// are ok.
54
55
// returns the current position in geo coordinates.
56
// first is x, second is y.
57
std::pair<Coord,Coord> operator*()
const
;
58
59
// prefix operator++
60
MapIterator
& operator++();
61
62
// prefix operator--
63
MapIterator
& operator--();
64
65
// postfix operator++
66
MapIterator
operator++(
int
);
67
68
// postfix operator--
69
MapIterator
operator--(
int
);
70
71
#ifdef MPI_FOUND
72
//method added for the parallel version
73
void
nextblock(
int
init);
74
#endif
75
76
private
:
77
bool
isPastBounds()
const
;
78
// If isTerminal is true, then this MapIterator object
79
// represents the terminal condition.
80
bool
isTerminal
;
81
82
GeoTransform
*
gt
;
83
Header
h
;
84
int
xcur
;
85
int
ycur
;
86
};
87
88
#endif
om_defs.hh
Header
Definition:
Header.hh:45
MapIterator
Definition:
MapIterator.hh:40
operator==
bool operator==(const MapIterator &lhs, const MapIterator &rhs)
Definition:
MapIterator.cpp:109
MapIterator::gt
GeoTransform * gt
Definition:
MapIterator.hh:82
operator!=
bool operator!=(const MapIterator &lhs, const MapIterator &rhs)
Definition:
MapIterator.cpp:124
MapIterator::isTerminal
bool isTerminal
Definition:
MapIterator.hh:80
MapIterator::h
Header h
Definition:
MapIterator.hh:83
MapIterator::xcur
int xcur
Definition:
MapIterator.hh:84
Header.hh
MapIterator::ycur
int ycur
Definition:
MapIterator.hh:85
GeoTransform
Definition:
GeoTransform.hh:58
src
openmodeller
env_io
MapIterator.hh
Generated on Thu Jan 8 2015 17:05:09 for openModeller by
1.8.6