[geos-commits] r2776 - trunk/source/headers/geos/linearref
svn_geos at osgeo.org
svn_geos at osgeo.org
Thu Dec 3 14:39:19 EST 2009
Author: mloskot
Date: 2009-12-03 14:39:19 -0500 (Thu, 03 Dec 2009)
New Revision: 2776
Modified:
trunk/source/headers/geos/linearref/LinearIterator.h
Log:
Part 15 of larger changeset - source/headers/geos/linearref:
* Declare noncopyable types as such explicitly (Ticket #304).
* Tidy up.
Modified: trunk/source/headers/geos/linearref/LinearIterator.h
===================================================================
--- trunk/source/headers/geos/linearref/LinearIterator.h 2009-12-03 19:38:12 UTC (rev 2775)
+++ trunk/source/headers/geos/linearref/LinearIterator.h 2009-12-03 19:39:19 UTC (rev 2776)
@@ -28,10 +28,8 @@
#include <geos/geom/LineSegment.h>
#include <geos/linearref/LinearLocation.h>
-namespace geos
+namespace geos { namespace linearref
{
-namespace linearref // geos::linearref
-{
/**
* An iterator over the components and coordinates of a linear geometry
@@ -52,22 +50,6 @@
*/
class LinearIterator
{
-private:
- static unsigned int segmentEndVertexIndex(const LinearLocation& loc);
-
- const geom::LineString *currentLine;
- unsigned int vertexIndex;
- unsigned int componentIndex;
- const geom::Geometry *linear;
- const unsigned int numLines;
-
- /**
- * Invariant: currentLine <> null if the iterator is pointing at a valid coordinate
- */
-
- void loadCurrentLine();
-
-
public:
/**
* Creates an iterator initialized to the start of a linear {@link Geometry}
@@ -148,7 +130,27 @@
* @return a {@link Coordinate} or <code>null</code>
*/
geom::Coordinate getSegmentEnd() const;
+
+private:
+
+ static unsigned int segmentEndVertexIndex(const LinearLocation& loc);
+
+ const geom::LineString *currentLine;
+ unsigned int vertexIndex;
+ unsigned int componentIndex;
+ const geom::Geometry *linear;
+ const unsigned int numLines;
+
+ /**
+ * Invariant: currentLine <> null if the iterator is pointing at a valid coordinate
+ */
+ void loadCurrentLine();
+
+ // Declare type as noncopyable
+ LinearIterator(const LinearIterator& other);
+ LinearIterator& operator=(const LinearIterator& rhs);
};
-}
-}
-#endif
+
+}} // namespace geos::linearref
+
+#endif // GEOS_LINEARREF_LINEARITERATOR_H
More information about the geos-commits
mailing list