GEOS  3.3.3
CoordinateArrayFilter.h
1 /**********************************************************************
2  * $Id: CoordinateArrayFilter.h 2556 2009-06-06 22:22:28Z strk $
3  *
4  * GEOS - Geometry Engine Open Source
5  * http://geos.refractions.net
6  *
7  * Copyright (C) 2001-2002 Vivid Solutions Inc.
8  * Copyright (C) 2006 Refractions Research Inc.
9  *
10  * This is free software; you can redistribute and/or modify it under
11  * the terms of the GNU Lesser General Public Licence as published
12  * by the Free Software Foundation.
13  * See the COPYING file for more information.
14  *
15  **********************************************************************/
16 
17 #ifndef GEOS_UTIL_COORDINATEARRAYFILTER_H
18 #define GEOS_UTIL_COORDINATEARRAYFILTER_H
19 
20 #include <geos/export.h>
21 #include <cassert>
22 
23 #include <geos/geom/CoordinateFilter.h>
24 #include <geos/geom/CoordinateSequence.h>
25 #include <geos/geom/Coordinate.h>
26 
27 namespace geos {
28 namespace util { // geos::util
29 
38 private:
39  geom::Coordinate::ConstVect &pts; // target vector reference
40 public:
47  :
48  pts(target)
49  {}
50 
51  virtual ~CoordinateArrayFilter() {}
52 
53  virtual void filter_ro(const geom::Coordinate *coord)
54  {
55  pts.push_back(coord);
56  }
57 };
58 
59 
60 } // namespace geos.util
61 } // namespace geos
62 
63 #endif // GEOS_UTIL_COORDINATEARRAYFILTER_H
64 
65 /**********************************************************************
66  * $Log$
67  * Revision 1.2 2006/06/19 23:33:03 strk
68  * Don't *require* CoordinateFilters to define both read-only and read-write methods.
69  *
70  * Revision 1.1 2006/03/09 16:46:49 strk
71  * geos::geom namespace definition, first pass at headers split
72  *
73  **********************************************************************/