Back to Adaptive Vision Library website

You are here: Start » Function Reference » Loop Generators » EnumerateIntegers

EnumerateIntegers


Header:STD.h
Namespace:avl

In each consecutive iteration produces a consecutive number from an arithmetic sequence.

Syntax

bool avl::EnumerateIntegers
(
	Enumerate1DState& ioState,
	int inStart,
	atl::Optional<int> inCount,
	int inStep,
	int& outValue,
	atl::Optional<bool> outIsFirst = atl::NIL,
	atl::Optional<bool> outIsLast = atl::NIL
)

Parameters

Name Type Range Default Description
ioState Enumerate1DState& Object used to maintain state of the function.
inStart int First value of the generated sequence
inCount Optional<int> 0 - NIL Length of the generated sequence
inStep int Value added in each iteration
outValue int&
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.