All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CoverageSeriesIterator.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file CoverageSeriesIterator.cpp
22 
23  \brief This file contains an iterator that is able to traverse all observations
24  of a coverage series.
25 */
26 
27 //ST
28 #include "CoverageSeriesIterator.h"
29 
31 {
32 }
33 
34 te::st::CoverageSeriesIterator::CoverageSeriesIterator(const CoverageSeriesObservationSet::const_iterator& it) :
35  m_it(it)
36 {
37 }
38 
41 {
42  if(this == &rhs)
43  return *this;
44 
45  m_it = rhs.m_it;
46  return *this;
47 }
48 
50 {
51  return m_it == rhs.m_it;
52 }
53 
55 {
56  return m_it != rhs.m_it;
57 }
58 
60 {
61  ++m_it;
62  return *this;
63 }
64 
66 {
67  te::st::CoverageSeriesIterator result = *this;
68  ++m_it;
69  return result;
70 }
71 
73 {
74  --m_it;
75  return *this;
76 }
77 
79 {
80  te::st::CoverageSeriesIterator result = *this;
81  --m_it;
82  return result;
83 }
84 
86 {
87  return *m_it;
88 }
89 
91 {
92  return m_it->first.get();
93 }
94 
96 {
97  return m_it->second.get();
98 }
99 
101 {
102 }
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 
std::pair< te::dt::DateTimeShrPtr, CoverageShrPtr > CoverageSeriesObservation
bool operator==(const CoverageSeriesIterator &rhs)
Operator ==.
CoverageSeriesIterator & operator++()
Prefix operator ++.
This file contains an iterator that is able to traverse all observations of a coverage series...
A class to traverse the observations of a CoverageSeries.
CoverageSeriesObservation operator*() const
Prefix operator *.
bool operator!=(const CoverageSeriesIterator &rhs)
Operator !=.
CoverageSeriesObservationSet::const_iterator m_it
The internal cursor.
CoverageSeriesIterator & operator--()
Prefix operator –.
te::st::Coverage * getCoverage() const
It returns the coverage pointed by the internal cursor.
te::dt::DateTime * getTime() const
It returns the time pointed by the internal cursor.
virtual ~CoverageSeriesIterator()
Virtual destructor.
An abstract class to represent a coverage.
Definition: Coverage.h:63
const CoverageSeriesIterator & operator=(const CoverageSeriesIterator &rhs)
Assignment operator.