[geos-commits] r2771 - trunk/source/headers/geos/geom/prep

svn_geos at osgeo.org svn_geos at osgeo.org
Thu Dec 3 14:29:54 EST 2009


Author: mloskot
Date: 2009-12-03 14:29:54 -0500 (Thu, 03 Dec 2009)
New Revision: 2771

Modified:
   trunk/source/headers/geos/geom/prep/PreparedLineStringIntersects.h
   trunk/source/headers/geos/geom/prep/PreparedPolygonPredicate.h
Log:
Part 10of larger changeset - source/headers/geos/geom/prep:
* Declare noncopyable types as such explicitly (Ticket #304).
* Added Visual C++ pragmas.
* Tidy up.

Modified: trunk/source/headers/geos/geom/prep/PreparedLineStringIntersects.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedLineStringIntersects.h	2009-12-03 19:27:18 UTC (rev 2770)
+++ trunk/source/headers/geos/geom/prep/PreparedLineStringIntersects.h	2009-12-03 19:29:54 UTC (rev 2771)
@@ -47,40 +47,6 @@
  */
 class PreparedLineStringIntersects
 {
-private:
-protected:
-	PreparedLineString & prepLine;
-	//PreparedLineString * prepLine;
-
-	/**
-	 * Tests whether any representative point of the test Geometry intersects
-	 * the target geometry.
-	 * Only handles test geometries which are Puntal (dimension 0)
-	 * 
-	 * @param geom a Puntal geometry to test
-	 * @return true if any point of the argument intersects the prepared geometry
-	 */
-	bool isAnyTestPointInTarget(const geom::Geometry * testGeom) const;
-	//{
-	//	/**
-	//	 * This could be optimized by using the segment index on the lineal target.
-	//	 * However, it seems like the L/P case would be pretty rare in practice.
-	//	 */
-	//	PointLocator * locator = new PointLocator();
-
-	//	geom::Coordinate::ConstVect coords;
-	//	ComponentCoordinateExtracter::getCoordinates( *testGeom, coords);
-
-	//	for (size_t i=0, n=coords.size(); i<n; i++)
-	//	{
-	//		geom::Coordinate c = *(coords[i]);
-	//		if ( locator->intersects( c, &(prepLine->getGeometry()) ))
-	//			return true;
-	//	}
-	//	return false;
-	//}
-
-
 public:
 
 	/**
@@ -112,10 +78,43 @@
 	 */
 	bool intersects(const geom::Geometry * g) const;
 
-};
+protected:
+	PreparedLineString & prepLine;
+	//PreparedLineString * prepLine;
 
+	/**
+	 * Tests whether any representative point of the test Geometry intersects
+	 * the target geometry.
+	 * Only handles test geometries which are Puntal (dimension 0)
+	 * 
+	 * @param geom a Puntal geometry to test
+	 * @return true if any point of the argument intersects the prepared geometry
+	 */
+	bool isAnyTestPointInTarget(const geom::Geometry * testGeom) const;
+	//{
+	//	/**
+	//	 * This could be optimized by using the segment index on the lineal target.
+	//	 * However, it seems like the L/P case would be pretty rare in practice.
+	//	 */
+	//	PointLocator * locator = new PointLocator();
 
+	//	geom::Coordinate::ConstVect coords;
+	//	ComponentCoordinateExtracter::getCoordinates( *testGeom, coords);
 
+	//	for (size_t i=0, n=coords.size(); i<n; i++)
+	//	{
+	//		geom::Coordinate c = *(coords[i]);
+	//		if ( locator->intersects( c, &(prepLine->getGeometry()) ))
+	//			return true;
+	//	}
+	//	return false;
+	//}
+
+    // Declare type as noncopyable
+    PreparedLineStringIntersects(const PreparedLineStringIntersects& other);
+    PreparedLineStringIntersects& operator=(const PreparedLineStringIntersects& rhs);
+};
+
 } // namespace geos::geom::prep
 } // namespace geos::geom
 } // namespace geos

Modified: trunk/source/headers/geos/geom/prep/PreparedPolygonPredicate.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedPolygonPredicate.h	2009-12-03 19:27:18 UTC (rev 2770)
+++ trunk/source/headers/geos/geom/prep/PreparedPolygonPredicate.h	2009-12-03 19:29:54 UTC (rev 2771)
@@ -58,6 +58,10 @@
 class PreparedPolygonPredicate 
 {
 private:
+    // Declare type as noncopyable
+    PreparedPolygonPredicate(const PreparedPolygonPredicate& other);
+    PreparedPolygonPredicate& operator=(const PreparedPolygonPredicate& rhs);
+
 protected:
 	const PreparedPolygon * const prepPoly;
 



More information about the geos-commits mailing list