00001 /********************************************************************** 00002 * $Id: PreparedPolygonCovers.h 2159 2008-08-18 16:27:02Z mloskot $ 00003 * 00004 * GEOS - Geometry Engine Open Source 00005 * http://geos.refractions.net 00006 * 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 00017 #ifndef GEOS_GEOM_PREP_PREPAREDPOLYGONCOVERS_H 00018 #define GEOS_GEOM_PREP_PREPAREDPOLYGONCOVERS_H 00019 00020 #include <geos/geom/prep/AbstractPreparedPolygonContains.h> // inherited 00021 00022 // forward declarations 00023 namespace geos { 00024 namespace geom { 00025 class Geometry; 00026 00027 namespace prep { 00028 class PreparedPolygon; 00029 } 00030 } 00031 } 00032 00033 namespace geos { 00034 namespace geom { // geos::geom 00035 namespace prep { // geos::geom::prep 00036 00051 class PreparedPolygonCovers : public AbstractPreparedPolygonContains 00052 { 00053 private: 00054 protected: 00062 bool fullTopologicalPredicate( const geom::Geometry * geom); 00063 00064 public: 00073 static bool covers(const PreparedPolygon * const prep, const geom::Geometry * geom) 00074 { 00075 PreparedPolygonCovers polyInt(prep); 00076 return polyInt.covers(geom); 00077 } 00078 00084 PreparedPolygonCovers(const PreparedPolygon * const prep) 00085 : AbstractPreparedPolygonContains( prep, false) 00086 { } 00087 00094 bool covers( const Geometry * geom) 00095 { 00096 return eval( geom); 00097 } 00098 00099 }; 00100 00101 } // geos::geom::prep 00102 } // geos::geom 00103 } // geos 00104 00105 #endif // GEOS_GEOM_PREP_PREPAREDPOLYGONCOVERS_H 00106 /********************************************************************** 00107 * $Log$ 00108 **********************************************************************/ 00109