DK11 for Delphi | GisLayerVector.TGIS_LayerVector.Loop | Overloads | Constructors | Fields | Methods | Properties | Events
Prepares enumerator (also known as iterator or cursor) to iterate the layer.
// Delphi public function Loop : TGIS_LayerVectorEnumeratorFactory; overload; virtual;
// C++ Builder public: virtual TGIS_LayerVectorEnumeratorFactory* Loop(void) /* overload */;
Type | Description |
---|---|
TGIS_LayerVectorEnumeratorFactory | Shape enumerator' |
// Indirect use var shp : TGIS_Shape ; begin // automated enumerators for shp in layer.Loop( some_extent, 'POPULATION>100000 AND AREA>50333' ) do begin dosomething(); end ; end ; // Direct enumerator use var shp : TGIS_Shape ; en : TGIS_LayerVectorEnumerator ; begin en := layer.Loop( some_extent, 'POPULATION>100000 AND AREA>50333' ).GetEnumerator ; while en.MoveNext do begin shp := en.GetCurrent ; dosomething(); end ; en.Free ; end ;
// Indirect use // Indirect use is not possible due to C++ limitation // Direct enumerator use TGIS_LayerVectorEnumerator *en; en = layer->Loop(some_extent,"POPULATION>100000 AND AREA>50333")->GetEnumerator() ; while (en->MoveNext()) { shp = en->Current; dosomething(); } delete en;