Version 6.3.8 für Windows
 —  Leitfaden zur Programmierung  —

Interface IEnumerator

This document covers the following topics:


Purpose

This is the main interface of the component SoftwareAG.NaturalX.Enumerator. It is returned when a new instance of the component is created.

define data
local
1 #enum handle of object
end-define
*
* Create an instance of the class SoftwareAG.NaturalX.Enumerator.
create object #enum of 'SoftwareAG.NaturalX.Enumerator.4'
if #enum eq null-handle
  escape routine
end-if
*
end

After successful execution of the CREATE OBJECT statement, the variable #enum contains an interface of the type IEnumerator.

Seitenanfang

Methods

The following methods are available:

Attach

Attaches a collection to the enumerator. A previously attached collection is then automatically detached. After having attached a collection, the enumerator can be used to enumerate the items contained in that collection.

Parameters

Name Natural Type Variant Type Remark
Collection HANDLE OF OBJECT VT_DISPATCH By value
Collection

A collection of Automation objects.

Reset

Resets the enumerator to its initial state. A subsequent call to the method Next returns the first item in the collection.

Next

Returns the next item in the collection. If there is no next item, NULL-HANDLE is returned. To start the enumeration over, the method Reset can be called.

Parameters

Name Natural Type Variant Type Remark
Return value HANDLE OF OBJECT VT_DISPATCH  
Return value

An interface to the next item in the collection.

Seitenanfang