GEOS  3.14.0dev
CoordinateSequenceFilter.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2009 Sandro Santilli <strk@kbt.io>
7  *
8  * This is free software; you can redistribute and/or modify it under
9  * the terms of the GNU Lesser General Public Licence as published
10  * by the Free Software Foundation.
11  * See the COPYING file for more information.
12  *
13  **********************************************************************
14  *
15  * Last port: geom/CoordinateSequenceFilter.java rev. 1.3 (JTS-1.9)
16  *
17  **********************************************************************/
18 
19 #pragma once
20 
21 #include <geos/export.h>
22 
23 #include <cassert>
24 #include <cstddef>
25 
26 // Forward declarations
27 namespace geos {
28 namespace geom {
29 class CoordinateSequence;
30 }
31 }
32 
33 namespace geos {
34 namespace geom { // geos::geom
35 
56 class GEOS_DLL CoordinateSequenceFilter {
57 
58 public:
59 
60  virtual
62 
69  virtual void
70  filter_rw(CoordinateSequence& /*seq*/, std::size_t /*i*/)
71  {
72  assert(0);
73  }
74 
81  virtual void
82  filter_ro(const CoordinateSequence& /*seq*/, std::size_t /*i*/)
83  {
84  assert(0);
85  }
86 
95  virtual bool isDone() const = 0;
96 
97 
110  virtual bool isGeometryChanged() const = 0;
111 
112 };
113 
114 } // namespace geos::geom
115 } // namespace geos
116 
117 
Interface for classes which provide operations that can be applied to the coordinates in a Coordinate...
Definition: CoordinateSequenceFilter.h:56
virtual bool isDone() const =0
Reports whether the application of this filter can be terminated.
virtual void filter_ro(const CoordinateSequence &, std::size_t)
Performs an operation on a coordinate in a CoordinateSequence.
Definition: CoordinateSequenceFilter.h:82
virtual void filter_rw(CoordinateSequence &, std::size_t)
Performs an operation on a coordinate in a CoordinateSequence.
Definition: CoordinateSequenceFilter.h:70
virtual bool isGeometryChanged() const =0
Reports whether the execution of this filter has modified the coordinates of the geometry.
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25