Back to Adaptive 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
inArray const Array<T>& Input array
inStart int 0 - Index of the first element to be enumerated.
inCount Optional<int> 0 - NIL Number of elements to be enumerated. Leave 'Auto' to enumerate to the end of the input array.
inInvert bool False Flag indicating whether to enumerate backwards or not
inDelay bool False Minimum time between iterations in milliseconds
inRepeat bool False Determines whether to repeat loop
outElement T& Element from the array
outIndex int& Index of the output element
outIsFirst Optional<bool> NIL Flag indicating the first iteration
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.