ChainedApplier
Short summary
An abstract class to implement the logic of Appliers for forEach. Users only need to implement apply in inherited class and should not change any other method.
| Access | Abstract | Final | Extends | Implements |
|---|---|---|---|---|
| No | Yes | AbstractDisposableContainer | CNM_CollectionInterfaces.IChainedApplier |
UML Diagram
Parameters
none
Properties
actions
Type: CNM_CollectionInterfaces.IApplierList
This property returns a list of actions/operations performed by this applier.…
className
Type: CNM_AbstractObject.ClassName
This abstract property returns the class name of the concrete object, …
Methods
accept
- Parameters:
object(CNM_AbstractObject.IObject): object to accept
- Return type: CNM_ReturnTypes.SingleExecutionResult
Method to accept an object.…
andThen
- Parameters:
applier(CNM_CollectionInterfaces.IApplier): the applier to be used on each object
- Return type: CNM_CollectionInterfaces.IChainedApplier
Method to concat actions perfomed on an object. This way two (or more) Actions can be performed on data with one foreach.…
apply
- Parameters:
execute(BOOL): control bit to start or abort the application, should to be active until the CNM_ReturnTypes.SingleExecutionState is SUCCESS
- Return type: CNM_ReturnTypes.SingleExecutionState
A method to apply the concrete action on the given object (THIS^.object)…
clearContents
- Return type:
VOID
This method is called in the destruct method and is intended to zero all references and interfaces that should not be destructed. …
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): if TRUE, the retain variables are initialized (warm start / cold start)bInCopyCode(BOOL): if TRUE, the instance afterwards gets moved into the copy code (online change)firstApplier(CNM_CollectionInterfaces.IApplier)secondApplier(CNM_CollectionInterfaces.IApplier)
- Return type:
BOOL
The constructor FB_init is needed to create an unique hash code.…
Code
Declaration
{attribute 'enable_dynamic_creation'}
FUNCTION_BLOCK FINAL ChainedApplier EXTENDS AbstractDisposableContainer IMPLEMENTS CNM_CollectionInterfaces.IChainedApplier
VAR
object :CNM_AbstractObject.IObject;
END_VAR
VAR
myactions :ApplierList();
END_VAR