00001 /********************************************************************** 00002 * $Id: CoordinateArrayFilter.h 2556 2009-06-06 22:22:28Z strk $ 00003 * 00004 * GEOS - Geometry Engine Open Source 00005 * http://geos.refractions.net 00006 * 00007 * Copyright (C) 2001-2002 Vivid Solutions Inc. 00008 * Copyright (C) 2006 Refractions Research Inc. 00009 * 00010 * This is free software; you can redistribute and/or modify it under 00011 * the terms of the GNU Lesser General Public Licence as published 00012 * by the Free Software Foundation. 00013 * See the COPYING file for more information. 00014 * 00015 **********************************************************************/ 00016 00017 #ifndef GEOS_UTIL_COORDINATEARRAYFILTER_H 00018 #define GEOS_UTIL_COORDINATEARRAYFILTER_H 00019 00020 #include <geos/export.h> 00021 #include <cassert> 00022 00023 #include <geos/geom/CoordinateFilter.h> 00024 #include <geos/geom/CoordinateSequence.h> 00025 #include <geos/geom/Coordinate.h> 00026 00027 namespace geos { 00028 namespace util { // geos::util 00029 00037 class GEOS_DLL CoordinateArrayFilter: public geom::CoordinateFilter { 00038 private: 00039 geom::Coordinate::ConstVect &pts; // target vector reference 00040 public: 00046 CoordinateArrayFilter(geom::Coordinate::ConstVect& target) 00047 : 00048 pts(target) 00049 {} 00050 00051 virtual ~CoordinateArrayFilter() {} 00052 00053 virtual void filter_ro(const geom::Coordinate *coord) 00054 { 00055 pts.push_back(coord); 00056 } 00057 }; 00058 00059 00060 } // namespace geos.util 00061 } // namespace geos 00062 00063 #endif // GEOS_UTIL_COORDINATEARRAYFILTER_H 00064 00065 /********************************************************************** 00066 * $Log$ 00067 * Revision 1.2 2006/06/19 23:33:03 strk 00068 * Don't *require* CoordinateFilters to define both read-only and read-write methods. 00069 * 00070 * Revision 1.1 2006/03/09 16:46:49 strk 00071 * geos::geom namespace definition, first pass at headers split 00072 * 00073 **********************************************************************/