Back to Aurora Vision Library website

You are here: Start » Function Reference » All Functions » Loop Generators » EnumerateElements

EnumerateElements


This is Filter Equivalent. This function may be present in generated code, but should not be used in hand-written code.

Header: STD.h
Namespace: avl
Module: FoundationLite

In each iteration gets a consecutive element of the input array.

Syntax

void avl::EnumerateElements
(
	const atl::Array<T>& inArray,
	int inStart,
	atl::Optional<int> inCount,
	bool inInvert,
	bool inDelay,
	bool inRepeat,
	T& outElement,
	int& outIndex,
	atl::Optional<bool> outIsFirst = atl::NIL,
	atl::Optional<bool> outIsLast = atl::NIL
)

Parameters

Name Type Range Default Description
Input value inArray const Array<T>& Input array
Input value inStart int 0 - Index of the first element to be enumerated.
Input value inCount Optional<int> 0 - NIL Number of elements to be enumerated. Leave 'Auto' to enumerate to the end of the input array.
Input value inInvert bool False Flag indicating whether to enumerate backwards or not
Input value inDelay bool False Minimum time between iterations in milliseconds
Input value inRepeat bool False Determines whether to repeat loop
Output value outElement T& Element from the array
Output value outIndex int& Index of the output element
Output value outIsFirst Optional<bool> NIL Flag indicating the first iteration
Output value outIsLast Optional<bool> NIL Flag indicating the last iteration

Optional Outputs

The computation of following outputs can be switched off by passing value atl::NIL to these parameters: outIsFirst, outIsLast.

Read more about Optional Outputs.