[geos-commits] r2777 - trunk/source/headers/geos/noding/snapround

svn_geos at osgeo.org svn_geos at osgeo.org
Thu Dec 3 14:41:18 EST 2009


Author: mloskot
Date: 2009-12-03 14:41:15 -0500 (Thu, 03 Dec 2009)
New Revision: 2777

Modified:
   trunk/source/headers/geos/noding/snapround/HotPixel.h
   trunk/source/headers/geos/noding/snapround/MCIndexPointSnapper.h
   trunk/source/headers/geos/noding/snapround/MCIndexSnapRounder.h
   trunk/source/headers/geos/noding/snapround/SimpleSnapRounder.h
Log:
Part 16 of larger changeset - source/headers/geos/noding/snapround:
* Declare noncopyable types as such explicitly (Ticket #304).
* Added Visual C++ pragmas.
* Tidy up.
* Unified EOL and style.

Modified: trunk/source/headers/geos/noding/snapround/HotPixel.h
===================================================================
--- trunk/source/headers/geos/noding/snapround/HotPixel.h	2009-12-03 19:39:19 UTC (rev 2776)
+++ trunk/source/headers/geos/noding/snapround/HotPixel.h	2009-12-03 19:41:15 UTC (rev 2777)
@@ -136,6 +136,10 @@
 	bool intersectsPixelClosure(const geom::Coordinate& p0,
 			const geom::Coordinate& p1);
  
+    // Declare type as noncopyable
+    HotPixel(const HotPixel& other);
+    HotPixel& operator=(const HotPixel& rhs);
+
 public:
 
 	HotPixel(const geom::Coordinate& pt,

Modified: trunk/source/headers/geos/noding/snapround/MCIndexPointSnapper.h
===================================================================
--- trunk/source/headers/geos/noding/snapround/MCIndexPointSnapper.h	2009-12-03 19:39:19 UTC (rev 2776)
+++ trunk/source/headers/geos/noding/snapround/MCIndexPointSnapper.h	2009-12-03 19:41:15 UTC (rev 2777)
@@ -48,10 +48,6 @@
  */
 class GEOS_DLL MCIndexPointSnapper {
 
-private:
-
-	index::SpatialIndex& index;
-
 public:
  
 
@@ -60,7 +56,6 @@
 		index(nIndex)
 	{}
 
-
 	/**
 	 * Snaps (nodes) all interacting segments to this hot pixel.
 	 * The hot pixel may represent a vertex of an edge,
@@ -79,7 +74,15 @@
 	bool snap(HotPixel& hotPixel) {
 		return snap(hotPixel, 0, 0);
 	}
-		
+
+
+private:
+
+	index::SpatialIndex& index;
+
+    // Declare type as noncopyable
+    MCIndexPointSnapper(const MCIndexPointSnapper& other);
+    MCIndexPointSnapper& operator=(const MCIndexPointSnapper& rhs);
 };
 
 

Modified: trunk/source/headers/geos/noding/snapround/MCIndexSnapRounder.h
===================================================================
--- trunk/source/headers/geos/noding/snapround/MCIndexSnapRounder.h	2009-12-03 19:39:19 UTC (rev 2776)
+++ trunk/source/headers/geos/noding/snapround/MCIndexSnapRounder.h	2009-12-03 19:41:15 UTC (rev 2777)
@@ -76,6 +76,24 @@
  */
 class GEOS_DLL MCIndexSnapRounder: public Noder { // implments Noder
 
+public:
+
+	MCIndexSnapRounder(geom::PrecisionModel& nPm);
+
+	std::vector<SegmentString*>* getNodedSubstrings() const;
+
+	void computeNodes(std::vector<SegmentString*>* segStrings);
+ 
+	/**
+	 * Computes nodes introduced as a result of
+	 * snapping segments to vertices of other segments
+	 *
+	 * @param segStrings the list of segment strings to snap together
+	 *        NOTE: they *must* be instances of NodedSegmentString, or
+	 * 	  an assertion will fail.
+	 */
+	void computeVertexSnaps(std::vector<SegmentString*>& edges);
+
 private:
 
 	/// externally owned
@@ -117,24 +135,9 @@
 	
 	void checkCorrectness(std::vector<SegmentString*>& inputSegmentStrings);
 
-public:
-
-	MCIndexSnapRounder(geom::PrecisionModel& nPm);
-
-	std::vector<SegmentString*>* getNodedSubstrings() const;
-
-	void computeNodes(std::vector<SegmentString*>* segStrings);
- 
-	/**
-	 * Computes nodes introduced as a result of
-	 * snapping segments to vertices of other segments
-	 *
-	 * @param segStrings the list of segment strings to snap together
-	 *        NOTE: they *must* be instances of NodedSegmentString, or
-	 * 	  an assertion will fail.
-	 */
-	void computeVertexSnaps(std::vector<SegmentString*>& edges);
-
+    // Declare type as noncopyable
+    MCIndexSnapRounder(const MCIndexSnapRounder& other);
+    MCIndexSnapRounder& operator=(const MCIndexSnapRounder& rhs);
 };
 
 

Modified: trunk/source/headers/geos/noding/snapround/SimpleSnapRounder.h
===================================================================
--- trunk/source/headers/geos/noding/snapround/SimpleSnapRounder.h	2009-12-03 19:39:19 UTC (rev 2776)
+++ trunk/source/headers/geos/noding/snapround/SimpleSnapRounder.h	2009-12-03 19:41:15 UTC (rev 2777)
@@ -72,7 +72,27 @@
  */
 class GEOS_DLL SimpleSnapRounder: public Noder { // implements NoderIface
 
+public:
+
+	SimpleSnapRounder(const geom::PrecisionModel& newPm);
+
+	std::vector<SegmentString*>* getNodedSubstrings() const;
+
+	void computeNodes(std::vector<SegmentString*>* inputSegmentStrings);
+
+	void add(const SegmentString* segStr);
+
+	/**
+	 * Computes nodes introduced as a result of
+	 * snapping segments to vertices of other segments
+	 *
+	 * @param segStrings the list of segment strings to snap together.
+	 *        Must be NodedSegmentString or an assertion will fail.
+	 */
+	void computeVertexSnaps(const std::vector<SegmentString*>& edges);
+
 private:
+
 	const geom::PrecisionModel& pm;
 	algorithm::LineIntersector li;
 	double scaleFactor;
@@ -114,24 +134,9 @@
 	 */
 	void computeVertexSnaps(NodedSegmentString* e0, NodedSegmentString* e1);
 
-public:
-
-	SimpleSnapRounder(const geom::PrecisionModel& newPm);
-
-	std::vector<SegmentString*>* getNodedSubstrings() const;
-
-	void computeNodes(std::vector<SegmentString*>* inputSegmentStrings);
-
-	void add(const SegmentString* segStr);
-
-	/**
-	 * Computes nodes introduced as a result of
-	 * snapping segments to vertices of other segments
-	 *
-	 * @param segStrings the list of segment strings to snap together.
-	 *        Must be NodedSegmentString or an assertion will fail.
-	 */
-	void computeVertexSnaps(const std::vector<SegmentString*>& edges);
+    // Declare type as noncopyable
+    SimpleSnapRounder(const SimpleSnapRounder& other);
+    SimpleSnapRounder& operator=(const SimpleSnapRounder& rhs);
 };
 
 } // namespace geos::noding::snapround



More information about the geos-commits mailing list