11 #ifndef OOPS_INTERFACE_GEOMETRYITERATOR_H_
12 #define OOPS_INTERFACE_GEOMETRYITERATOR_H_
18 #include "eckit/geometry/Point2.h"
20 #include "oops/util/Logger.h"
21 #include "oops/util/ObjectCounter.h"
22 #include "oops/util/Printable.h"
23 #include "oops/util/Timer.h"
28 template<
typename TRAIT>
30 eckit::geometry::Point2>,
31 public util::Printable,
32 private util::ObjectCounter<GeometryIterator<TRAIT>> {
36 static const std::string
classname() {
return "oops::GeometryIterator";}
44 eckit::geometry::Point2
operator*()
const;
52 void print(std::ostream &)
const;
58 template<
typename TRAIT>
60 Log::trace() <<
"GeometryIterator<TRAIT>::GeometryIterator starting" << std::endl;
61 util::Timer timer(classname(),
"GeometryIterator");
63 Log::trace() <<
"GeometryIterator<TRAIT>::GeometryIterator done" << std::endl;
68 template<
typename TRAIT>
70 Log::trace() <<
"GeometryIterator<TRAIT>::GeometryIterator starting" << std::endl;
71 util::Timer timer(classname(),
"GeometryIterator");
73 Log::trace() <<
"GeometryIterator<TRAIT>::GeometryIterator done" << std::endl;
78 template<
typename TRAIT>
80 Log::trace() <<
"GeometryIterator<TRAIT>::~GeometryIterator starting" << std::endl;
81 util::Timer timer(classname(),
"~GeometryIterator");
82 geometryiter_.reset();
83 Log::trace() <<
"GeometryIterator<TRAIT>::~GeometryIterator done" << std::endl;
88 template<
typename TRAIT>
90 Log::trace() <<
"GeometryIterator<TRAIT>::operator== starting" << std::endl;
91 util::Timer timer(classname(),
"operator==");
93 Log::trace() <<
"GeometryIterator<TRAIT>::operator== done" << std::endl;
99 template<
typename TRAIT>
101 Log::trace() <<
"GeometryIterator<TRAIT>::operator!= starting" << std::endl;
102 util::Timer timer(classname(),
"operator!=");
103 bool notequals = (*geometryiter_ != other.
geometryiter());
104 Log::trace() <<
"GeometryIterator<TRAIT>::operator!= done" << std::endl;
111 template<
typename TRAIT>
113 Log::trace() <<
"GeometryIterator<TRAIT>::operator* starting" << std::endl;
114 util::Timer timer(classname(),
"operator*");
115 eckit::geometry::Point2 loc = *(*geometryiter_);
116 Log::trace() <<
"GeometryIterator<TRAIT>::operator* done" << std::endl;
122 template<
typename TRAIT>
124 Log::trace() <<
"GeometryIterator<TRAIT>::operator++ starting" << std::endl;
125 util::Timer timer(classname(),
"operator++");
127 Log::trace() <<
"GeometryIterator<TRAIT>::operator++ done" << std::endl;
134 template<
typename TRAIT>
136 Log::trace() <<
"GeometryIterator<TRAIT>::print starting" << std::endl;
137 util::Timer timer(classname(),
"print");
138 os << *geometryiter_;
139 Log::trace() <<
"GeometryIterator<TRAIT>::print done" << std::endl;
bool operator!=(const GeometryIterator &)
eckit::geometry::Point2 operator*() const
void print(std::ostream &) const
const GeometryIterator_ & geometryiter() const
Interfacing.
GeometryIterator_ & geometryiter()
bool operator==(const GeometryIterator &)
GeometryIterator operator++()
TRAIT::GeometryIterator GeometryIterator_
std::unique_ptr< GeometryIterator_ > geometryiter_
static const std::string classname()
GeometryIterator(const GeometryIterator &)
The namespace for the main oops code.