[geos-commits] r2921 - trunk/include/geos/operation/polygonize

svn_geos at osgeo.org svn_geos at osgeo.org
Mon Feb 22 16:29:56 EST 2010


Author: strk
Date: 2010-02-22 16:29:55 -0500 (Mon, 22 Feb 2010)
New Revision: 2921

Modified:
   trunk/include/geos/operation/polygonize/Polygonizer.h
Log:
Try to document current behaviour (very bad behaviour indeed...)


Modified: trunk/include/geos/operation/polygonize/Polygonizer.h
===================================================================
--- trunk/include/geos/operation/polygonize/Polygonizer.h	2010-02-21 17:11:38 UTC (rev 2920)
+++ trunk/include/geos/operation/polygonize/Polygonizer.h	2010-02-22 21:29:55 UTC (rev 2921)
@@ -183,7 +183,11 @@
 	/** \brief
 	 * Get the list of dangling lines found during polygonization.
 	 *
-	 * @return a collection of the input LineStrings which are dangles
+	 * @return a collection of the input LineStrings which are dangles.
+	 *         ownership of vector is retained by this object while
+	 *	   elements will be pointers to inside the input.
+	 *
+	 * TODO: return by const vector reference instead !
 	 */
 	std::vector<const geom::LineString*>* getDangles();
 
@@ -192,8 +196,11 @@
 	 * Get the list of cut edges found during polygonization.
 	 *
 	 * @return a (possibly empty) reference to collection of the input
-	 *         LineStrings which are cut edges. Ownership retained by
-	 *         this object.
+	 *         LineStrings which are cut edges. Ownership of vector
+	 *	   retained by this object while elements will be pointers
+	 *         to inside the input.
+	 *
+	 * TODO: return by const vector reference instead !
 	 */
 	std::vector<const geom::LineString*>* getCutEdges();
 
@@ -201,10 +208,13 @@
 	 * Get the list of lines forming invalid rings found during
 	 * polygonization.
 	 *
-	 * Ownership is tranferred to caller, second call will return
-	 * NULL (unless polygonize is called again).
-	 * @return a collection of LineStrings which form
-	 * invalid rings
+	 * @return a collection of LineStrings which form invalid rings
+	 * Ownership of vector is tranferred to caller.
+	 * On second call will return NULL (unless polygonize is called again).
+	 * Elements of vector will need be released by caller (or will be
+	 * released by this class if nobody ever called this method).
+	 *
+	 * TODO: always retain ownership of vector and elements, return by const ref !
 	 */
 	std::vector<geom::LineString*>* getInvalidRingLines();
 



More information about the geos-commits mailing list