DG Kernel (ActiveX) Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Upgrading Native Apps
Licensing
Collapse ModelsModels
Collapse DG Kernel ControlsDG Kernel Controls
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Go to DGKC docs Search Documentation


IIterator(64) Interface

GetCount
GetHeadPosition
GetNext
GetTailPosition
GetPrev

IIterator interface allows iterating trough list of various entities in DG Kernel software. All methods except GetCount() manipulate position in the list. A list position is represented by a 32 or 64 bit integral type POSN. Note that position is not an index, but rather a key of an element in the list. The actual value can be any integer number, including negative numbers.

Specific implementations of lists have different methods for setting or retrieving elements of the list. Those methods take position parameter, obtained with the help of IIterator. 

See also IMesh Interface List


HRESULT GetCount(int* count)

Parameters

count - [out, retval] Returned count of elements in the list

Return Values

S_OK in case of success.

Remarks

This method returns  number of elements in the list.


HRESULT GetHeadPosition(POSN* head)

Parameters

head- [out, retval] Returned position of the first element in the list.

Return Values

S_OK in case of success.

Remarks

This method returns position of the first element in the list.


HRESULT GetNext(POSN* position)

Parameters

position - [in, out] Reference to a position in the list

Return Values

S_OK in case of success.

Remarks

Increments position in the list. If supplied position was the tail position in the list after the call to this method it will be set to 0 (NULL value).


HRESULT GetTailPosition(POSN* tail)

Parameters

tail - [out] Returned position of the last element in the list.

Return Values

S_OK in case of success.

Remarks

This method returns position of the last element in the list.


HRESULT GetPrev(POSN* position)

Parameters

position - [in, out] Reference to a position in the list

Return Values

S_OK in case of success.

Remarks

Decrements position in the list. If supplied position was the head position in the list after the call to this method it will be set to 0 (NULL value).