Back to Aurora Vision Library website

You are here: Start » Function Reference » All Functions » Array Composition » AvsFilter_InsertToArray

AvsFilter_InsertToArray


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: avs
Module: FoundationLite

Inserts a new element to an array at a specified location.

Syntax

void avs::AvsFilter_InsertToArray
(
	atl::Array<Type>& ioArray,
	const Type& inValue,
	int inIndex,
	bool inInverse
)

Parameters

Name Type Range Default Description
Input will be modified ioArray Array<Type>&
Input value inValue const Type& Input value to be inserted
Input value inIndex int 0 - Input index within the inArray at which the inValue will be placed
Input value inInverse bool False Determines if the indices are counted from beginning or from end of the input array

Examples

inArray = {1,2,3,4,5}
inIndex = 1
inValue = 10
outArray = {1,10,2,3,4,5}
inArray = {1,2,3,4,5}
inIndex = 5
inValue = 10
outArray = {1,2,3,4,5,10}

Errors

List of possible exceptions:

Error type Description
DomainError Index out of range in InsertToArray.

See Also