Skip to main content

ForEachStrategyExecutor

Short summary​

An class to implement parallel and serial foreach strategies.

Warning: Uses the iterate function of the attached collection and will thus conflict with other foreach and iterate statements of the same collection instance.

AccessAbstractFinalExtendsImplements
INTERNALNoYesCNM_AbstractObject.ObjectCNM_CollectionInterfaces.IForEachStrategy

UML Diagram​

Parameters

none

Properties​

className​

Type: CNM_AbstractObject.ClassName

This abstract property returns the class name of the concrete object, …

instant​

Type: CNM_CollectionInterfaces.IInstantForEachStrategy

This property returns a fluent interface for immediate (wihtin one call) operations of appliers.…

Methods​

FB_Exit​

  • Parameters:
    • bInCopyCode (BOOL): TRUE: the exit method is called in order to leave the instance which will be copied afterwards (online change).
  • Return type: BOOL

Mark the object as deleted, as it staiys in the memory.…

FB_Init​

  • Parameters:
    • bInitRetains (BOOL): TRUE: the retain variables are initialized (reset warm / reset cold)
    • bInCopyCode (BOOL): TRUE: the instance will be copied to the copy code afterward (online change)
    • collection (CNM_CollectionInterfaces.ICollection)
  • Return type: BOOL

code. You can evaluate the return value.methods explicitly and provide additional code there with the standard initializationThe return value is not evaluated. For a specific influence, you can also declare theFB_Init is always available implicitly and it is used primarily for initialization.…

parallel​

Method to perform a given action on all objects inside the collection.…

selectApplier​

…

serial​

Method to perform a given action on all objects inside the collection.…

Code​

Declaration​

FUNCTION_BLOCK INTERNAL FINAL ForEachStrategyExecutor EXTENDS CNM_AbstractObject.Object IMPLEMENTS CNM_CollectionInterfaces.IForEachStrategy
VAR
usedCollection :CNM_CollectionInterfaces.ICollection;
{attribute 'no_copy'}
serialIterator :CNM_CollectionInterfaces.IIterator;
{attribute 'no_copy'}
parallelIterator :CNM_CollectionInterfaces.IIterator;
{attribute 'no_Copy'}
instantExecutor :ForEachInstantStrategyExecutor(THIS^.usedCollection);
END_VAR