DK11 for Delphi | GisLayerVector.TGIS_LayerVectorEnumerator | Classes | Constructors | Methods | Properties
Vector layer enumerator.
// Delphi type TGIS_LayerVectorEnumerator = class( TObject ) end;
// C++ Builder class PASCALIMPLEMENTATION TGIS_LayerVectorEnumerator : public TObject { };
→ TObject
Name | Visibility | Description | |
---|---|---|---|
Create(TGIS_LayerVector; TGIS_Extent; String; TGIS_Shape; String; Boolean) | public | Create an enumerator instance. | |
Create(TGIS_LayerVectorEnumeratorFactory; TGIS_LayerVector; TGIS_Extent; String; TGIS_Shape; String; Boolean) | public | Create an enumerator instance. | |
Destroy | public | Destroy an object. | |
Name | Visibility | Description | |
---|---|---|---|
BindField | public | Obtain a bind number for a given field name. | |
GetCurrent | public | Get current enumerator value. | |
GetField | public | Get field value for a shape given by unique identity. | |
MoveNext | public | Move to next record | |
Reset | public | Reset enumerator. | |
Name | Visibility | Description | |
---|---|---|---|
Current | public | Current enumerator value. | |
Cursor | public | Current cursor index. | |
There is no garbage collector for TGIS_LayerVectorEnumerator instances. Because of this, the layer enumerator must be destroyed, by calling TGIS_LayerVectorEnumerator.Free, after it has been used. Check examples below.
// Indirect use var shp : TGIS_Shape ; begin // automated enumerators for shp in layer.Loop( some_extent ) do begin dosomething(); end ; end ; // Direct use by using layer's Enumerator Factory var shp : TGIS_Shape ; en : TGIS_LayerVectorEnumerator ; begin en := layer.Loop( some_extent ).GetEnumerator ; while en.MoveNext do begin shp := en.GetCurrent ; dosomething(); end ; en.Free ; end ; // Direct use by using enumerator constructor var shp : TGIS_Shape ; en : TGIS_LayerVectorEnumerator ; begin en := TGIS_LayerVectorEnumerator.Create( layer, some_extent, '', nil, '', True ) ; while en.MoveNext do begin shp := en.Current ; dosomething(); end ; en.Free ; end ;