F_VN_CopyContainerElementsConditional_ITcVnForwardIterator
Copys container elements to a new container, depending on a custom condition.
Syntax
Definition:
FUNCTION F_VN_CopyContainerElementsConditional_ITcVnForwardIterator : HRESULT
VAR_INPUT
ipSrcContainer : ITcVnContainer;
ipDestContainer : Reference To ITcVnContainer;
ipConditionFB : ITcVnCustomElementCondition_ITcVnForwardIterator;
hrPrev : HRESULT;
END_VAR
Inputs
Name |
Type |
Description |
---|---|---|
ipSrcContainer |
Source container | |
ipDestContainer |
Reference To ITcVnContainer |
Returns a container with elements, that match the condition |
ipConditionFB |
Custom condition | |
hrPrev |
HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.) |
Further information
The function F_VN_CopyContainerElementsConditional_ITcVnForwardIterator
filters elements of multi-dimensional containers. The filter condition is to be specified by a function block with the interface ITcVnCustomElementCondition_ITcVnForwardIterator.
Unlike F_VN_CopyContainerElementsConditional_ITcVnContainer, sub-containers are not transferred to the conditional method Condition
, but iterators, which each point to the first element of the sub-container.
Parameter
Input container
The input container ipSrcContainer
must be a multi-dimensional container; i.e. the container must contain sub-containers as elements. Thus all containers of the type ContainerType_Vector_Vector_<…>
can be used.
Result container
The result container ipDestContainer
contains all sub-containers that satisfy the condition in ipConditionFB
.
Filter condition
The filter condition must be defined as the method Condition
of a function block. So that this function block can be transferred to the function as the parameter ipConditionFB
, it must implement the interface ITcVnCustomElementCondition_ITcVnForwardIterator.
Samples
Related functions
Required License
TC3 Vision Base
System Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT V3.1.4024.54 or later | PC or CX (x64) with PL50, e.g. Intel 4-core Atom CPU | Tc3_Vision |