AutoCAD Map 3D 2009 Geospatial Platform Reference

AutoCAD Map 3D Geospatial Platform API

MgCoordinateIterator Class Reference
[MgCoordinateIterator]

Inherits MgDisposable.

List of all members.


Detailed Description

The class MgCoordinateIterator supports iteration over the coordinates of a geometry or path instruction.

Remarks:
MgCoordinateIterator only supports read access to the underlying coordinates. Initially, the iterator is positioned before the first coordinate. Reset also brings the iterator back to this position. At this position, calling GetCurrent throws an exception. Therefore, you must call MoveNext to advance the iterator to the first coordinate before calling GetCurrent.

Public Member Functions

virtual MgCoordinateGetCurrent ()
 Gets the current coordinate. After an iterator is created or after a Reset, MoveNext must be called to advance the iterator to the first coordinate before calling GetCurrent; otherwise, the current position is undefined and an exception is thrown.
virtual bool MoveNext ()
 Advances the iterator to the next coordinate. After an iterator is created or after a call to Reset, an iterator is positioned before the first coordinate, and the first call to MoveNext moves the iterator over the first coordinate. After the last coordinate is passed, subsequent calls to MoveNext return false until Reset is called.
virtual void Reset ()
 Sets the iterator to its initial position prior to the first coordinate.