00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.osgeo.org 00005 * 00006 * Copyright (C) 2001-2002 Vivid Solutions Inc. 00007 * Copyright (C) 2006 Refractions Research Inc. 00008 * 00009 * This is free software; you can redistribute and/or modify it under 00010 * the terms of the GNU Lesser General Public Licence as published 00011 * by the Free Software Foundation. 00012 * See the COPYING file for more information. 00013 * 00014 **********************************************************************/ 00015 00016 #ifndef GEOS_GEOM_UTIL_COMPONENTCOORDINATEEXTRACTER_H 00017 #define GEOS_GEOM_UTIL_COMPONENTCOORDINATEEXTRACTER_H 00018 00019 #include <vector> 00020 00021 #include <geos/geom/GeometryComponentFilter.h> 00022 #include <geos/geom/Geometry.h> // to be removed when we have the .inl 00023 #include <geos/geom/Coordinate.h> // to be removed when we have the .inl 00024 #include <geos/geom/LineString.h> // to be removed when we have the .inl 00025 #include <geos/geom/Point.h> // to be removed when we have the .inl 00026 //#include <geos/platform.h> 00027 00028 namespace geos { 00029 namespace geom { // geos::geom 00030 namespace util { // geos::geom::util 00031 00038 class ComponentCoordinateExtracter : public GeometryComponentFilter 00039 { 00040 public: 00048 static void getCoordinates(const Geometry &geom, std::vector<const Coordinate*> &ret); 00049 00054 ComponentCoordinateExtracter( std::vector<const Coordinate*> &newComps); 00055 00056 void filter_rw( Geometry * geom); 00057 00058 void filter_ro( const Geometry * geom); 00059 00060 private: 00061 00062 Coordinate::ConstVect &comps; 00063 00064 // Declare type as noncopyable 00065 ComponentCoordinateExtracter(const ComponentCoordinateExtracter& other); 00066 ComponentCoordinateExtracter& operator=(const ComponentCoordinateExtracter& rhs); 00067 }; 00068 00069 } // namespace geos.geom.util 00070 } // namespace geos.geom 00071 } // namespace geos 00072 00073 #endif //GEOS_GEOM_UTIL_COMPONENTCOORDINATEEXTRACTER_H