|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IEnumSegment
Provides access to members that iterate over collections of segments (obtained from the EnumSegments property on the ISegmentCollection interface).
The methods on IEnumSegment interface can be used to access segments of a segment collection. Those methods are more efficient than the ISegmentCollection methods to access a large number of segments in a sequential order for polyline and polygon. The collection methods transform absolute segment index into a part relative index, enumerators don't.
Method Summary | |
---|---|
void |
esri_clone(IEnumSegment[] outEnumerator)
Returns a copy of this enumerator positioned at the same segment. |
boolean |
isLastInPart()
Indicates if the current segment is last in the current part. |
boolean |
isRecycling()
Indicates if this enumerator re-uses the same segment each time next is called. |
void |
next(ISegment[] outSegment,
int[] outPartIndex,
int[] segmentIndex)
Returns the next segment, and its location in the collection. |
void |
nextEx(_esriSegmentInfo[] outSegment)
Populates a segment info structure with information on the next segment in the collection. |
void |
nextInPart(ISegment[] outSegment,
int[] outSegmentIndex)
Returns the next segment in current part, goes back to first segment after last segment in part is encountered. |
void |
nextInPartEx(_esriSegmentInfo[] outSegment)
Returns the next segment info structure in current part, goes back to first segment after last segment in part is encountered. |
void |
previous(ISegment[] outSegment,
int[] outPartIndex,
int[] segmentIndex)
Returns the previous segment in this segment collection. |
void |
reset()
Starts from the beginning of the segment collection the next time Next is called. |
void |
resetToEnd()
Starts from the end of the path, ring, polyline or polygon the next time Previous is called. |
void |
setAt(int iPart,
int iSegment)
Resets enumerator to specific location. |
void |
skip(int numSegments)
Skips forward or backward over a specified number of segments. |
Method Detail |
---|
void nextEx(_esriSegmentInfo[] outSegment) throws IOException, AutomationException
The NextEx method advances the enumerator to the next position and returns the segment and the associated information using an esriSegmentInfo structure.
outSegment
- A Structure: com.esri.arcgis.geometry._esriSegmentInfo (A com.esri.arcgis.geometry._esriSegmentInfo COM typedef) (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void next(ISegment[] outSegment, int[] outPartIndex, int[] segmentIndex) throws IOException, AutomationException
The NextEx method advances the enumerator to the next position, returns the segment, the part index and the segment index.
See picture for a graphical explanation of some of the IEnumSegment methods.
outSegment
- A reference to a com.esri.arcgis.geometry.ISegment (out: use single element array)outPartIndex
- The outPartIndex (in/out: use single element array)segmentIndex
- The segmentIndex (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void skip(int numSegments) throws IOException, AutomationException
The skip method jumps over a given number of segments in ascending (positive number) or descending (negative number) order and set the enumerator at that position. For example, if the enumerator is in its initial position (ex: after reset) calling skip 2 will move the enumerator to the position just before segment index= 2, therefore calling next will return segment index = 2.
numSegments
- The numSegments (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void reset() throws IOException, AutomationException
Reset the enumerator. For example, the following call to IEnumSegment::Next returns segment index = 0.
See picture for a graphical explanation of some of the IEnumSegment methods.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void esri_clone(IEnumSegment[] outEnumerator) throws IOException, AutomationException
outEnumerator
- A reference to a com.esri.arcgis.geometry.IEnumSegment (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void resetToEnd() throws IOException, AutomationException
The ResetToEnd method set the enumerator to its end. Using the Previous method in this situation will return the last segment of the last part.
See picture for a graphical explanation of some of the IEnumSegment methods.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void previous(ISegment[] outSegment, int[] outPartIndex, int[] segmentIndex) throws IOException, AutomationException
The Previous method returns the segment before the current position. For example, if the enumerator is in position Part Index = 0 and Segment Index = 1, then calling previous will return the segment located at Part Index = 0 and Segment Index = 0.
See picture for a graphical explanation of some of the IEnumSegment methods.
outSegment
- A reference to a com.esri.arcgis.geometry.ISegment (out: use single element array)outPartIndex
- The outPartIndex (in/out: use single element array)segmentIndex
- The segmentIndex (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setAt(int iPart, int iSegment) throws IOException, AutomationException
The SetAt method allows setting the enumerator at any given location in the enumerator. Then using the Next method will return the specified segment. For example, using SetAt(1,0) followed by Next will return the segment located at Part Index = 1 and Segment Index = 0.
See picture for a graphical explanation of some of the IEnumSegment methods.
iPart
- The iPart (in)iSegment
- The iSegment (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void nextInPartEx(_esriSegmentInfo[] outSegment) throws IOException, AutomationException
The NextInPartEx method is returning the next segment in the current part along with more information about the segment than the NextInPart method. As oppose to the Next method the NextInpartEx method limits its search to the part where the enumerator is currently located. For example, if the enumerator is located on the last segment of a given part then NextInPartEx will return the first segment of that part.
outSegment
- A Structure: com.esri.arcgis.geometry._esriSegmentInfo (A com.esri.arcgis.geometry._esriSegmentInfo COM typedef) (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void nextInPart(ISegment[] outSegment, int[] outSegmentIndex) throws IOException, AutomationException
The NextInPart method is returning the next segment in the current part. As oppose to the Next method the NextInpart method limits its search to the part where the enumerator is currently located. For example, if the enumerator is located on the last segment of a given part then NextInPartEx will return the first segment of that part.
outSegment
- A reference to a com.esri.arcgis.geometry.ISegment (out: use single element array)outSegmentIndex
- The outSegmentIndex (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isLastInPart() throws IOException, AutomationException
The IsLastInPart method returns 'True' if the enumerator is located on the last segment of a given part. For example, if a polyline has 2 parts and 3 segments in each part, IsLastInPart would return 'true' when the enumerator is located at Part Index = 0 Segment Index = 2 and Part Index = 1 Segment Index = 2.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isRecycling() throws IOException, AutomationException
The IsRecycling method indicates whether or not modifications to segments in the segment collection are seen or not by the enumerator. If 'True' then modifications to segments will not be seen by the enumerator, if 'False' then the enumerator is always up to date and represents the current state of the segment collection.
Note: The IsRecycling state is contolled by the system and cannot be directly changed by users.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |