FV3 Bundle
GeometryQGIterator.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2009-2016 ECMWF.
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  * In applying this licence, ECMWF does not waive the privileges and immunities
7  * granted to it by virtue of its status as an intergovernmental organisation nor
8  * does it submit to any jurisdiction.
9  */
10 
11 #ifndef QG_MODEL_GEOMETRYQGITERATOR_H_
12 #define QG_MODEL_GEOMETRYQGITERATOR_H_
13 
14 #include <iterator>
15 #include <string>
16 
17 #include "model/GeometryQG.h"
18 #include "model/QgFortran.h"
19 
20 #include "oops/base/GeoLocation.h"
21 #include "oops/util/ObjectCounter.h"
22 #include "oops/util/Printable.h"
23 
24 namespace oops {
25  class GeoLocation;
26 }
27 
28 namespace qg {
29 
30 class GeometryQG;
31 
32 // -----------------------------------------------------------------------------
33 class GeometryQGIterator: public std::iterator<std::forward_iterator_tag,
34  oops::GeoLocation>,
35  public util::Printable,
36  private util::ObjectCounter<GeometryQGIterator> {
37  public:
38  static const std::string classname() {return "qg::GeometryQGIterator";}
39 
41  explicit GeometryQGIterator(const GeometryQG & geom, const int & index = 1);
43 
44  bool operator==(const GeometryQGIterator &) const;
45  bool operator!=(const GeometryQGIterator &) const;
48 
49  F90iter & toFortran() {return keyIter_;}
50  const F90iter & toFortran() const {return keyIter_;}
51 
52  private:
53  void print(std::ostream &) const;
55 };
56 
57 } // namespace qg
58 
59 #endif // QG_MODEL_GEOMETRYQGITERATOR_H_
const F90iter & toFortran() const
void print(std::ostream &) const
bool operator==(const GeometryQGIterator &) const
static const std::string classname()
The namespace for the main oops code.
bool operator!=(const GeometryQGIterator &) const
GeometryQGIterator & operator++()
oops::GeoLocation operator*() const
int F90iter
Definition: QgFortran.h:28
GeometryQG handles geometry for QG model.
Definition: GeometryQG.h:33
GeometryQGIterator(const GeometryQGIterator &)
The namespace for the qg model.