00001 /********************************************************************** 00002 * $Id: GeometryFilter.h 1820 2006-09-06 16:54:23Z mloskot $ 00003 * 00004 * GEOS - Geometry Engine Open Source 00005 * http://geos.refractions.net 00006 * 00007 * Copyright (C) 2001-2002 Vivid Solutions Inc. 00008 * Copyright (C) 2005 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_GEOM_GEOMETRYFILTER_H 00018 #define GEOS_GEOM_GEOMETRYFILTER_H 00019 00020 //#include <geos/platform.h> 00021 00022 #include <geos/inline.h> 00023 00024 #include <string> 00025 #include <vector> 00026 #include <cassert> 00027 00028 namespace geos { 00029 namespace geom { // geos::geom 00030 class Geometry; 00031 } 00032 } 00033 00034 namespace geos { 00035 namespace geom { // geos::geom 00036 00037 00049 class GeometryFilter { 00050 public: 00051 /* 00052 * Performs an operation with or on <code>geom</code>. 00053 * 00054 * @param geom a <code>Geometry</code> to which the filter 00055 * is applied. 00056 * 00057 * NOTE: this are not pure abstract to allow read-only 00058 * or read-write-only filters to avoid defining a fake 00059 * version of the not-implemented kind. 00060 */ 00061 virtual void filter_ro(const Geometry * /*geom*/) { assert(0); } 00062 virtual void filter_rw(Geometry * /*geom*/) { assert(0); } 00063 00064 virtual ~GeometryFilter() {} 00065 }; 00066 00067 } // namespace geos::geom 00068 } // namespace geos 00069 00070 //#ifdef GEOS_INLINE 00071 //# include "geos/geom/GeometryFilter.inl" 00072 //#endif 00073 00074 #endif // ndef GEOS_GEOM_GEOMETRYFILTER_H 00075 00076 /********************************************************************** 00077 * $Log$ 00078 * Revision 1.4 2006/06/12 17:14:11 strk 00079 * added assert(0) version of filter_ro() and filter_rw() to allow implementations to only defined the required one. 00080 * 00081 * Revision 1.3 2006/06/08 11:20:24 strk 00082 * Added missing virtual destructor to abstract classes. 00083 * 00084 * Revision 1.2 2006/03/24 09:52:41 strk 00085 * USE_INLINE => GEOS_INLINE 00086 * 00087 * Revision 1.1 2006/03/09 16:46:49 strk 00088 * geos::geom namespace definition, first pass at headers split 00089 * 00090 **********************************************************************/