Workspace 6.21.5
|
#include <Workspace/DataExecution/Operations/Builtin/iteratingoperation.h>
Protected Member Functions | |
IteratingOperation () | |
~IteratingOperation () override | |
virtual bool | bringInputsUpToDateImpl () |
virtual bool | executeImpl () |
virtual bool | isIterationControlInput (const Input &input) const |
void | performCleanup (Workspace *workspaceToExecute, bool forceStop) override |
bool | performInitialisation (Workspace *workspaceToExecute) override |
bool | preIterations () override |
virtual void | setInputNotUpToDateImpl (InputScalar &input) |
void | setNonIterationControlInputsNotUpToDate () override |
void | terminateExecution () |
bool | updateInputsForIteration () override |
Protected Member Functions inherited from IteratingOperationBase | |
virtual bool | atEndCondition ()=0 |
virtual ExecutionResult | executeIteration (Workspace *workspaceToExecute) noexcept(false)=0 |
Workspace * | getWorkspaceToExecute () |
bool | isExecuting () const |
virtual bool | isLoopConditionValid () const =0 |
virtual void | performCleanup (Workspace *workspaceToExecute, bool forceStop) noexcept(false)=0 |
virtual bool | performInitialisation (Workspace *workspaceToExecute) noexcept(false)=0 |
virtual bool | postIterationExecute () |
virtual bool | preIterations ()=0 |
virtual void | setNonIterationControlInputsNotUpToDate () |
void | setWorkspaceToExecute (Workspace *workspace) |
virtual bool | updateInputsForIteration ()=0 |
virtual void | updateProgress ()=0 |
Protected Attributes | |
SimpleInput< bool > | enableLoop_ |
SimpleInput< bool > | wrap_ |
Protected Attributes inherited from IteratingOperationBase | |
bool | executing_ |
bool | reset_ |
Additional Inherited Members | |
Public Types inherited from IteratingOperationBase | |
enum | ExecutionResult { Abort , Success , Retry } |
Result of an iteration's execution. More... | |
Public Member Functions inherited from IteratingOperationBase | |
IteratingOperationBase () | |
virtual | ~IteratingOperationBase ()=default |
|
protected |
|
overrideprotecteddefault |
|
protectedvirtual |
Implementation of bringInputsUpToDate. This is needed here because we don't yet know whether or not our class is an operation or workspace type and so we can't simply override it as we usually would.
|
protectedvirtual |
Implementation of execute. Defined here so that derived classes can eaisly provide the default implementation. Cannot simply provide execute() method as we don't yet know whether we inherit from Operation or Workspace, so we rely on these classes to invoke this method.
|
protectedvirtual |
|
overrideprotectedvirtual |
workspaceToExecute | The workspace to execute |
forceStop | Whether or not to force the execution to stop when cleaning up. |
Cleanup opportunity following the attempted execution of iterations. Regardless of how the execution terminates (aborted or successful), this method is invoked.
Implements IteratingOperationBase.
Reimplemented in ParallelIteratingOperation< Derived >, and ParallelIteratingOperation< CountedLoop >.
|
overrideprotectedvirtual |
Initialisation opportunity prior to executing the iterations. This method is invoked using RAII, so its return value cannot be inspected. Therefore if errors occur, exceptions should be thrown.
Implements IteratingOperationBase.
Reimplemented in ParallelIteratingOperation< Derived >, and ParallelIteratingOperation< CountedLoop >.
|
overrideprotectedvirtual |
Invoked immediately prior to the commencement of any iterations. If 'wrap' is enabled, this will be invoked prior to each set of iterations.
Implements IteratingOperationBase.
Reimplemented in ParallelIteratingOperation< Derived >, and ParallelIteratingOperation< CountedLoop >.
|
protectedvirtual |
|
overrideprotectedvirtual |
Sets the non-iteration-control inputs to not-up-to-date at the beginning of each iteration. Derived classes must override this and may choose to not avail of the functionality or perform it differently depending on the need of the specific derived class.
Invoked immediately following preIterations(). Default implementation does nothing. Override if needed.
Reimplemented from IteratingOperationBase.
Reimplemented in ParallelIteratingOperation< Derived >, and ParallelIteratingOperation< CountedLoop >.
|
protected |
|
overrideprotectedvirtual |
Forces derived classes to specify how the iteration's input values are updated for each iteration of the loop. For most operations, this will be as simple as assigning a value to an input or an output (for operation-based iterators) and then flipping its up-to-date status to false, then back to true.
For example, in the counted loop:
*outputCounterValue_ = counterValue; outputCounterValue_.setUpToDate(false); outputCounterValue_.setUpToDate(true);
Implements IteratingOperationBase.
|
protected |
|
protected |