GEOS  3.9.1dev
CoordinateArrayFilter.h
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2001-2002 Vivid Solutions Inc.
7  * Copyright (C) 2006 Refractions Research Inc.
8  *
9  * This is free software; you can redistribute and/or modify it under
10  * the terms of the GNU Lesser General Public Licence as published
11  * by the Free Software Foundation.
12  * See the COPYING file for more information.
13  *
14  **********************************************************************/
15 
16 #ifndef GEOS_UTIL_COORDINATEARRAYFILTER_H
17 #define GEOS_UTIL_COORDINATEARRAYFILTER_H
18 
19 #include <geos/export.h>
20 #include <cassert>
21 
24 #include <geos/geom/Coordinate.h>
25 
26 namespace geos {
27 namespace util { // geos::util
28 
37 private:
38  geom::Coordinate::ConstVect& pts; // target vector reference
39 public:
46  :
47  pts(target)
48  {}
49 
50  virtual
52 
53  virtual void
55  {
56  pts.push_back(coord);
57  }
58 };
59 
60 
61 } // namespace geos.util
62 } // namespace geos
63 
64 #endif // GEOS_UTIL_COORDINATEARRAYFILTER_H
geom::Coordinate::ConstVect & pts
#define GEOS_DLL
Definition: export.h:28
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
Geometry classes support the concept of applying a coordinate filter to every coordinate in the Geome...
std::vector< const Coordinate * > ConstVect
A vector of const Coordinate pointers.
Definition: Coordinate.h:71
CoordinateArrayFilter(geom::Coordinate::ConstVect &target)
Constructs a CoordinateArrayFilter.
Basic namespace for all GEOS functionalities.
virtual void filter_ro(const geom::Coordinate *coord)
Performs an operation with coord.
A CoordinateFilter that adds read-only pointers to every Coordinate in a Geometry to a given vector...