Back to Adaptive Vision Library website

You are here: Start » Function Reference » Conditional Processing » ChooseByCase

ChooseByCase


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

Returns one of the input objects depending on the specified case index.

Syntax

void avl::ChooseByCase
(
	const Type& inObjectIfCase0,
	const Type& inObjectIfCase1,
	const Type& inObjectIfCase2,
	const Type& inObjectIfCase3,
	const Type& inObjectIfCase4,
	const Type& inObjectIfCase5,
	const Type& inObjectIfCase6,
	const Type& inObjectIfCase7,
	int inCaseIndex,
	Type& outObject
)

Parameters

Name Type Range Default Description
inObjectIfCase0 const Type& Object to be chosen for the case 0
inObjectIfCase1 const Type& Object to be chosen for the case 1
inObjectIfCase2 const Type& Object to be chosen for the case 2
inObjectIfCase3 const Type& Object to be chosen for the case 3
inObjectIfCase4 const Type& Object to be chosen for the case 4
inObjectIfCase5 const Type& Object to be chosen for the case 5
inObjectIfCase6 const Type& Object to be chosen for the case 6
inObjectIfCase7 const Type& Object to be chosen for the case 7
inCaseIndex int 0 - 7 Determines which object will be chosen
outObject Type& Chosen object

Examples

inObjectIfCase0 = "Alice"
inObjectIfCase1 = "Bob"
inObjectIfCase2 = "Mike"
inObjectIfCase3 = "Katherine"
inObjectIfCase4 = "John"
inObjectIfCase5 = "Thomas"
inObjectIfCase6 = "Patricia"
inObjectIfCase7 = "Frank"
inCaseIndex = 2
outObject = "Mike"

Errors

Error type Description
DomainError Case index out of range in ChooseByCase.

See Also