Back to Adaptive Vision Library website

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

MakeConditional


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

Checks a condition and: if the condition is True, then it copies the input object to the output; otherwise returns Nil.

Syntax

void avl::MakeConditional
(
	const Type& inObject,
	const bool inCondition,
	typename atl::ToConditionalType<Type>::Type& outConditionalObject
)

Parameters

Name Type Default Description
inObject const Type& The data to be conditionally passed onto the output or not
inCondition const bool Determines whether the data is passed onto the output or not
outConditionalObject typename ToConditionalType<Type>::Type& The object if the condition is met or nothing otherwise

Description

This function is a part of Conditional Execution technique in Adaptive Vision Studio and should not be used in Adaptive Vision Library. This functionality can be achieved using the "if" statement

Examples

inObject = 5
inCondition = True
outConditionalObject = 5
inObject = 5
inCondition = False
outConditionalObject = Nil

Remarks

This filter can be replaced with the following formula:

See Also

  • MergeDefault – Copies an object from a conditional input to an non-conditional output, replacing Nil with a predefined default value.