ForEachInstantStrategyExecutor
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.
| Access | Abstract | Final | Extends | Implements |
|---|---|---|---|---|
| INTERNAL | No | Yes | CNM_AbstractObject.Object | CNM_CollectionInterfaces.IInstantForEachStrategy |
UML Diagram
Parameters
none
Properties
className
Type: CNM_AbstractObject.ClassName
This abstract property returns the class name of the concrete object, …
Methods
attachCollection
- Parameters:
collection(CNM_CollectionInterfaces.ICollection)
- Return type:
VOID
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
- Parameters:
applier(CNM_CollectionInterfaces.IApplier): the applier (action) to be used on all obejcts in the collection
- Return type: CNM_ReturnTypes.SingleExecutionResult
Method to perform a given action on all objects inside the collection.…
selectApplier
- Parameters:
applier(CNM_CollectionInterfaces.IApplier)applierIndex(UDINT)nextApplier(CNM_CollectionInterfaces.IApplier)
- Return type:
BOOL
serial
- Parameters:
applier(CNM_CollectionInterfaces.IApplier): the applier to be used on all objects
- Return type: CNM_ReturnTypes.SingleExecutionResult
Method to perform a given action on all objects inside the collection.…
Code
Declaration
FUNCTION_BLOCK INTERNAL FINAL ForEachInstantStrategyExecutor EXTENDS CNM_AbstractObject.Object IMPLEMENTS CNM_CollectionInterfaces.IInstantForEachStrategy
VAR
usedCollection :CNM_CollectionInterfaces.ICollection;
{attribute 'no_copy'}
serialIterator :CNM_CollectionInterfaces.IIterator;
{attribute 'no_copy'}
parallelIterator :CNM_CollectionInterfaces.IIterator;
END_VAR