![]() |
Workspace 7.0.2
|
Container for all workspace elements (operations, connections, etc.). More...
#include <Workspace/DataExecution/Operations/workspace.h>
Public Member Functions | |
Workspace () | |
~Workspace () override | |
QUuid | addAnchor (const AnchorData &d) |
void | addAnchor (const QUuid &id, const AnchorData &d) |
void | addConnection (Connection &connection) |
QUuid | addMiniOperationRack (const MiniOperationRackData &data) |
void | addMiniOperationRack (const QUuid &id, const MiniOperationRackData &data) |
QUuid | addNoteItem (const NoteItemData &d) |
void | addNoteItem (const QUuid &id, const NoteItemData &d) |
void | addOperation (Operation &operation) |
void | addOperation (Operation &operation, const QString &id) |
void | addToUpdateSet (Updatable &updatable) |
virtual bool | canChangeAtomicUpdate () const |
void | checkRequestersForStatus () |
void | clear () |
Workspace * | clone () |
bool | comesFromExternal () const override |
bool | completeDelayedLoad () |
bool | containsOperationWithLabel (const QString &label, bool descendIntoNestedItems=false) |
Presentation::CustomOperationProperties * | createCustomPropertiesHandler () override |
void | ensureHasData () override |
bool | execute () override |
void | findNestedSourceUrls (QStringList &urlList, bool recursive=true) const |
AnchorData & | getAnchorData (const QUuid &id) |
const AnchorData & | getAnchorData (const QUuid &id) const |
QList< QUuid > | getAnchorIds () const |
const QString & | getCatalogueName () const |
const QString & | getCataloguePath () const |
Connection * | getConnection (size_type i) |
const Connection * | getConnection (size_type i) const |
QString | getDefaultIconPath () const override |
QList< Connection * > | getDisabledConnections (bool nestedWorkspaces) |
Updatable * | getErrorSource () |
const QString & | getExternalSourceUrl () const |
void | getGlobalNames (QStringList &globalNames, QStringList &globalNameDescriptions) const |
const InputScalar * | getInputForOperation (const WorkspaceInput &source) const |
InputScalar * | getInputForOperation (WorkspaceInput &source) |
const QString & | getManualLoadSourceUrl () const |
MiniOperationRackData & | getMiniOperationRackData (const QUuid &id) |
const MiniOperationRackData & | getMiniOperationRackData (const QUuid &id) const |
QUuid | getMiniOperationRackId (const Operation &operation) const |
QList< QUuid > | getMiniOperationRackIds () const |
bool | getMustRun () const |
const QString & | getNamespace () const |
NoteItemData & | getNoteItemData (const QUuid &id) |
const NoteItemData & | getNoteItemData (const QUuid &id) const |
QList< QUuid > | getNoteItemIds () const |
const QString & | getNotes () const |
size_type | getNumConnections () const |
size_type | getNumOperations () const |
Operation * | getOperation (size_type i) |
const Operation * | getOperation (size_type i) const |
Operation * | getOperationFromId (const QUuid &id) |
const Operation * | getOperationFromId (const QUuid &id) const |
WorkspaceInput * | getOperationFromInput (InputScalar &in) const |
WorkspaceOutput * | getOperationFromOutput (const Output &out) const |
size_type | getOperationIndex (const Operation &op) const |
QList< Operation * > | getOperationsWithFeature (const SchedulerFeature &feature, bool descendIntoNestedItems=false) |
QList< Operation * > | getOperationsWithLabel (const QString &label, bool descendIntoNestedItems=false) |
Operation * | getOperationWithGlobalName (const QString &globalName, bool descendIntoNestedItems=false) |
Operation * | getOperationWithLabel (const QString &label) |
const Output * | getOutputForOperation (const WorkspaceOutput &requester) const |
Output * | getOutputForOperation (WorkspaceOutput &requester) |
SchedulerFeatures | getRequiredSchedulerFeatures () const override |
const Workspace * | getRootWorkspace () const override |
Workspace * | getRootWorkspace () override |
const QString & | getSerializedText () const |
QString | getSourceDir () const |
const QString & | getSourceUrl () const |
bool | getSupportsRemoteExecution () const |
const QString & | getSyncSerializedWorkflow () const |
Updater & | getUpdater () |
const QString & | getUuid () |
QList< Variable * > | getVariableOperations () |
QList< const Variable * > | getVariableOperations () const |
QList< WorkspaceInput * > | getWorkspaceInputOperations () |
QList< const WorkspaceInput * > | getWorkspaceInputOperations () const |
QList< WorkspaceOutput * > | getWorkspaceOutputOperations () |
QList< const WorkspaceOutput * > | getWorkspaceOutputOperations () const |
QList< Workspace * > | getWorkspaces () |
QList< const Workspace * > | getWorkspaces () const |
QList< Workspace * > | getWorkspacesWithSourceUrl (const QString &sourceUrl, bool descendIntoNestedItems=false) |
bool | hasDisabledConnections () const |
bool | hasStarted () |
bool | hasStopped () |
bool | haveAnchor (const QUuid &id) const |
bool | haveMiniOperationRack (const QUuid &id) const |
bool | haveNoteItem (const QUuid &id) const |
void | idPathChanged () override |
void | inputDataTypeChanged (WorkspaceInput &source) |
bool | isAsynchronous () const override |
bool | isAtomicUpdate () const override |
bool | isConnectedToAsynchronous () const override |
bool | isDelayedLoad () const |
bool | isPaused () |
bool | isRoot () const |
bool | isRunning () |
bool | isRunningAsynchronously () const override |
bool | isScheduled () |
bool | isValid () const |
bool | isWaitingForAsynchronousUpdate () const override |
bool | load (const SerializedItem &item) override |
bool | loadFromFile (const QString &fileName, bool loadPlaceholdersOnly=false, bool updateWsResourcePath=true) |
bool | loadMetaData (const QString &serializedText) |
bool | loadWithoutOverwrite (const SerializedItem &item) |
void | logText (const QString &msg) |
void | modifyAnchor (const QUuid &id, const AnchorData &d) |
void | modifyNoteItem (const QUuid &id, const NoteItemData &d) |
bool | nestedHaveDisabledConnections () const |
void | outputDataTypeChanged (WorkspaceOutput &requester) |
void | pauseUpdate () |
void | processUpdateSet () |
void | regenerateOperationIds () |
bool | removeAnchor (const QUuid &id) |
bool | removeConnection (Connection &connection) |
void | removeFromUpdateSet (Updatable &updatable) |
bool | removeMiniOperationFromRack (const QUuid &opId, const QUuid &rackId) |
bool | removeMiniOperationRack (const QUuid &id) |
bool | removeNoteItem (const QUuid &id) |
bool | removeOperation (Operation &operation) |
void | requestContinuousUpdate () |
void | requestSingleShotUpdate (const QJsonDocument &schedulerSettings) |
void | requestSingleShotUpdate (const QStringList ¬ifyMailRecipients=QStringList()) |
void | requestStop () |
void | resetExecutionDependencies () override |
bool | saveToFile (const QString &fileName, bool saveData=false, bool saveAllOutputs=true) |
bool | saveToFileConst (const QString &fileName, bool saveData=false) const |
bool | saveWithData (SerializedItem &item) const override |
bool | saveWithData (SerializedItem &item, bool saveAllOutputs) const |
void | setAtomicUpdate (bool atomic) override |
void | setCatalogueName (const QString &name) |
void | setCataloguePath (const QString &path) |
void | setExternalSourceUrl (const QString &url) |
template<typename T > | |
bool | setGlobalNameValue (const QString &globalName, const T &value) |
void | setIdPathCachingEnabled (bool b) override |
void | setInputNotUpToDate (InputScalar &input) override |
void | setIsAsynchronous (bool asynchronous) override |
void | setIsRunningAsynchronously (bool running) override |
void | setIsScheduled (bool scheduled) |
void | setManualLoadSourceUrl (const QString &url) |
void | setMustRun (bool) |
void | setNamespace (const QString &name) |
void | setNotes (const QString ¬es) |
void | setOutputNotUpToDate (Output &output) override |
void | setOutputUpToDate (WorkspaceOutput &requester, bool b) |
void | setSourceUrl (const QString &url) |
void | setSupportsRemoteExecution (bool val) |
void | setSynchronisationSource (Workspace &) |
void | setSyncSerializedWorkflow (const QString &serializedWorkflow) |
void | setUpToDate (bool b) override |
void | setUuid (const QString &) |
void | setWasRunning (bool b) |
void | stopAndWaitUntilFinishedRunning () |
bool | synchronize () |
void | terminate () |
bool | update (Updater *updater=nullptr) override |
bool | wasRunning () |
void | workspaceChanged (Workspace *oldWorkspace) override |
![]() | |
~Operation () override | |
bool | addInput (Input &input, bool modifiedInPlace=false) |
bool | addOutput (Output &output) |
template<typename T > | |
bool | assignInput (const QString &inputName, const T &value) |
bool | canSerialize () const override |
bool | connectProgressEvents (QProgressBar *progressBar) |
virtual Presentation::CustomOperationProperties * | createCustomPropertiesHandler () |
virtual void | ensureHasData () |
bool | getBroadcastUpdateEvents () const |
QColor | getColor () const |
virtual QString | getDefaultIconPath () const |
QString | getDefaultUiPath () const |
QString | getDeprecationMessage () const |
const QString & | getDescription () const |
SerializedItem | getExtras () |
const OperationFactory & | getFactory () const |
Operation * | getFromPath (const QString &path, Workspace &relativeTo, QStringList &errors) const override |
virtual GraphicsSize | getGraphicsSize () const |
virtual QString | getHelpPage () const |
QString | getIconPath () const |
const QUuid & | getId () const |
QString | getIdPath (bool scoped=true) const override |
QString | getIdPath (const Workspace &relativeTo) const |
difference_type | getIndex (const Input &input, IndexCountingOptions options=SkipNone) const |
difference_type | getIndex (const Output &output, IndexCountingOptions options=SkipNone) const |
void | getIndexPair (InputScalar &input, difference_type &mainIndex, difference_type &arrayIndex) |
Input * | getInput (const QString &name) |
const Input * | getInput (const QString &name) const |
Input * | getInput (size_type index) |
const Input * | getInput (size_type index) const |
InputArray * | getInputArray (const QString &name) |
const InputArray * | getInputArray (const QString &name) const |
IOBaseIteratorRange< Input, false > | getInputs () |
IOBaseIteratorRange< Input, true > | getInputs () const |
InputScalar * | getInputScalar (const QString &name) |
const InputScalar * | getInputScalar (const QString &name) const |
template<typename T > | |
T & | getInputValue (const QString &inputName) |
template<typename T > | |
const T & | getInputValue (const QString &inputName) const |
const QString & | getLabel () const |
QString | getLabelRelativeToRoot () const |
Output * | getOutput (const QString &name) |
const Output * | getOutput (const QString &name) const |
Output * | getOutput (size_type index) |
const Output * | getOutput (size_type index) const |
IOBaseIteratorRange< Output, false > | getOutputs () |
IOBaseIteratorRange< Output, true > | getOutputs () const |
template<typename T > | |
T & | getOutputValue (const QString &outputName) |
template<typename T > | |
const T & | getOutputValue (const QString &outputName) const |
bool | getProfilingEnabled () const |
int | getProgress () const |
int | getProgressContribution () const |
bool | getProgressResetByNotUpToDate () const |
virtual SchedulerFeatures | getRequiredSchedulerFeatures () const |
InputScalar * | getScalarInput (size_type mainIndex, difference_type arrayIndex) |
QString | getShortLabel () const |
QString | getTagName () const |
bool | getTerminateExecution () const |
QString | getUiPath () const |
bool | getUpToDate () const override |
virtual bool | hasRequiredSchedulerFeatures () const |
void | idPathChanged () override |
virtual bool | inputRebuilt (InputScalar &input) |
virtual bool | isAsynchronous () const |
virtual bool | isAtomicUpdate () const |
bool | isConnectedToAsynchronous () const override |
bool | isDeprecated () const |
bool | isEditable () const |
bool | isIdPathCachingEnabled () const |
virtual bool | isPolymorphicType () const |
virtual bool | isRunningAsynchronously () const |
virtual bool | isThreadSafe () const |
template<typename T > | |
bool | isType () const |
bool | isType (const OperationFactory &type) const |
bool | isUpdating () const |
virtual bool | isUserConfigurable () |
bool | isUsingDefaultColor () const |
bool | isUsingDefaultIconPath () const |
bool | isUsingDefaultUiPath () const |
bool | isWaitingForAsynchronousUpdate () const override |
bool | isWorkspaceType () const |
bool | load (const SerializedItem &item) override |
void | markUpToDateWhereSafe () |
bool | matchesType (const Operation &otherOperation) const |
size_type | numInputs (IndexCountingOptions=SkipNone) const |
size_type | numOutputs (IndexCountingOptions=SkipNone) const |
bool | removeInput (const QString &name) |
bool | removeInput (Input &input) |
bool | removeOutput (const QString &name) |
bool | removeOutput (Output &output) |
virtual void | resetExecutionDependencies () |
bool | save (SerializedItem &item) const override |
virtual bool | saveWithData (SerializedItem &item) const |
virtual void | setAtomicUpdate (bool atomic) |
void | setBroadcastUpdateEvents (bool enable) |
void | setColor (const QColor &c) |
void | setDescription (const QString &description) |
void | setEditable (bool b) |
void | setIconPath (const QString &path) |
void | setId (const QUuid &id) |
virtual void | setIdPathCachingEnabled (bool b) |
virtual void | setInputNotUpToDate (InputScalar &input) |
virtual void | setIsAsynchronous (bool asynchronous) |
virtual void | setIsRunningAsynchronously (bool asynchronous) |
void | setLabel (const QString &label) |
virtual void | setOutputNotUpToDate (Output &output) |
void | setProfilingEnabled (bool enable) |
virtual void | setProgress (int percent) |
void | setProgressContribution (int percent) |
void | setProgressResetByNotUpToDate (bool b) |
virtual void | setRequiredSchedulerFeatures (const SchedulerFeatures &) |
void | setTerminateExecution (bool b) |
void | setUiPath (const QString &path) |
void | setUpToDate (bool b) override |
bool | update (Updater *updater=nullptr) override |
![]() | |
~WorkspaceElement () override | |
const Workspace * | getWorkspace () const override |
Workspace * | getWorkspace () override |
virtual void | workspaceChanged (Workspace *oldWorkspace) |
![]() | |
~Updatable () override | |
virtual bool | comesFromExternal () const |
QString | getEnclosingScope () const |
virtual Updatable * | getFromPath (const QString &path, Workspace &relativeTo, QStringList &errors) const =0 |
const QString & | getGlobalName () const |
virtual QString | getIdPath (bool scoped=true) const =0 |
virtual Workspace * | getRootWorkspace () |
virtual const Workspace * | getRootWorkspace () const |
QString | getScopedGlobalName () const |
virtual bool | getUpToDate () const =0 |
virtual const Workspace * | getWorkspace () const =0 |
virtual Workspace * | getWorkspace ()=0 |
virtual void | idPathChanged () |
virtual bool | isConnectedToAsynchronous () const =0 |
virtual bool | isWaitingForAsynchronousUpdate () const =0 |
void | setGlobalName (const QString &name) |
virtual void | setUpToDate (bool b)=0 |
virtual bool | update (Updater *updater=nullptr)=0 |
![]() | |
virtual | ~Observable () |
void | attachObserver (Observer &observer) |
void | destroy () |
void | detachObserver (Observer &observer) |
void | notifyEvent (const ObservableEvent &event) |
![]() | |
virtual | ~Serialize ()=default |
virtual bool | canSerialize () const =0 |
virtual bool | load (const SerializedItem &item)=0 |
virtual bool | save (SerializedItem &item) const =0 |
![]() | |
TextLogger () | |
TextLogger (const DataExecution::IOBase &io) | |
TextLogger (const DataExecution::Operation &operation) | |
TextLogger (const TextLogger &logger) | |
TextLogger (TextLogger &&logger) | |
virtual | ~TextLogger () |
void | logLine (const Application::LogManager::MessageCategory &category, const QString &msg) const |
void | logLine (const QString &msg) const |
void | logText (const Application::LogManager::MessageCategory &category, const QString &msg) const |
void | logText (const QString &msg) const |
TextLogger & | operator= (TextLogger) |
Static Public Member Functions | |
static QList< Operation * > | getDownstreamOperations (const Operation &source, const OperationFactory *opType=nullptr) |
static QList< Operation * > | getUpstreamOperations (const Operation &source, const OperationFactory *opType=nullptr) |
static void | setIgnoreAliasedOperations (bool value) |
static bool | synchronize (Workspace &, Workspace &) |
![]() | |
static InputScalar * | findInputScalarGlobalName (const QString &scopedGlobalName, Workspace &relativeTo) |
static IOBase * | findIOBaseGlobalName (const QString &scopedGlobalName, Workspace &relativeTo) |
static Operation * | findOperationGlobalName (const QString &scopedGlobalName, Workspace &relativeTo) |
Static Public Attributes | |
static const QString | WORKSPACE_SEARCH_PATH_PREFIX |
Protected Member Functions | |
Workspace (const OperationFactory &factory, const QString &label) | |
void | cancelExecution (bool b) override |
void | decrementUseCount () |
bool | finishInputsOutputsAfterLoad (const SerializedItem &item) override |
void | incrementUseCount () |
void | markOutputsUpToDate () override |
void | onWorkspaceAbortedUpdate () |
void | onWorkspaceFinishedExecution () |
void | onWorkspaceFinishedUpdate () |
bool | postSave (SerializedItem &item) const override |
bool | prepareInputsOutputsForLoad (const SerializedItem &item) override |
bool | shouldPutInExtras (const QString &tagName) const override |
![]() | |
Operation (const OperationFactory &factory, const QString &label) | |
bool | bringArrayOfInputsUpToDate (Input *&array, size_type arraySize) |
bool | bringArrayOfInputsUpToDate (std::vector< Input * > &array) |
virtual bool | bringInputsUpToDate () |
bool | bringInputUpToDate (Input &input) |
virtual void | cancelExecution (bool b) |
virtual bool | execute ()=0 |
virtual bool | finishInputsOutputsAfterLoad (const SerializedItem &item) |
Updater * | getCurrentUpdater () |
virtual const Input * | getRenamedInput (const QString &name) const |
virtual const Output * | getRenamedOutput (const QString &name) const |
virtual bool | inputsAreUpToDate () const |
virtual bool | makeOutputsValid () |
virtual void | markOutputsUpToDate () |
void | pauseUpdate () |
virtual bool | postSave (SerializedItem &item) const |
virtual bool | prepareInputsOutputsForLoad (const SerializedItem &item) |
void | saveExtras (SerializedItem &item) const |
virtual bool | shouldPutInExtras (const QString &tagName) const |
![]() | |
WorkspaceElement () | |
![]() | |
Updatable () | |
Updatable (const Updatable &up) | |
void | notifyUpdated () |
Updatable & | operator= (const Updatable &up) |
![]() | |
Observable () | |
Observable (const Observable &) | |
Additional Inherited Members | |
![]() | |
enum | ConfigStatus { GoodConfig = 0x00 , UnknownConfig = 0x01 , InvalidConfig = 0x02 } |
using | difference_type = ptrdiff_t |
enum | GraphicsSize { Default = 100 , Small = 65 } |
Options for the graphical size of an operation, able to be changed by derived classes. Values are percentages. More... | |
enum | IndexCountingOption { SkipNone = 0x0 , SkipInvisible = 0x1 , SkipDependencies = 0x2 } |
using | size_type = size_t |
A Workspace is the central component of the whole system. It contains the operations and connections that together form an executable network. The workspace is responsible for loading and saving the things it contains, and it is itself an operation, so workspaces can be nested to any level.
The workspace assumes it owns all operations and connections contained in it. When a workspace is deleted, it will first delete all its connections and then all its operations. This can be a problem if client code is still holding a reference to one of them, so client code may find it useful to create observers for RemoveOperationEvent and RemoveConnectionEvent on the workspace. If a client wants to preserve an operation beyond the life of the workspace, the only way is to remove the operation from the workspace before the workspace is deleted. Removing an operation with removeOperation() does not delete it, it just removes it from the list of operations the workspace contains. Removing the operation but keeping it in existence effectively makes the operation invisible, but still active. Doing the same thing with connections is less straightforward, since even if a connection is removed from a workspace with removeConnection(), it can still be deleted if the operation at either end of the connection is destroyed. It should also be noted that destroying an operation with its operation factory or destroying a connection with its Connection::destroy() function will remove it from the workspace as well (ie no special action is required to do this).
All operations in a workspace are consecutively numbered, starting from 1. This requirement is enforced by all Workspace functions, even for a workspace read in from an external file (the operations are renumbered).
It is allowable for a workspace to create a recursive external reference, meaning it relies on itself through externally sourced workspaces. When this occurs, the loading of a workspace will be delayed until it is actually needed for execution. Note, however, that once loaded, a recursive workspace is not unloaded again when finished, so the memory it uses will not be released until the top level workspace is closed or the application is finished. Therefore, a heavily recursive workspace arrangement is not advisable. It is not possible to create recursive workspaces without references to external workspace files.
|
protected |
Allows subclasses to specify their factory and label. These are passed through unchanged to the Operation constructor.
Workspace | ( | ) |
By default, workspaces are constructed with the label "Workspace" and with no operations or any other workspace elements present.
|
override |
Clean up private implementation.
QUuid addAnchor | ( | const AnchorData & | d | ) |
void addAnchor | ( | const QUuid & | id, |
const AnchorData & | d | ||
) |
void addConnection | ( | Connection & | connection | ) |
connection | The connection to add to the workspace. |
An AddConnectionEvent notification is raised as the last thing this function does.
QUuid addMiniOperationRack | ( | const MiniOperationRackData & | data | ) |
void addMiniOperationRack | ( | const QUuid & | id, |
const MiniOperationRackData & | data | ||
) |
QUuid addNoteItem | ( | const NoteItemData & | d | ) |
void addNoteItem | ( | const QUuid & | id, |
const NoteItemData & | d | ||
) |
void addOperation | ( | Operation & | operation | ) |
operation | The operation to add to the workspace. |
An AddOperationEvent notification is raised as the last thing this function does.
new
. The workspace assumes an operation factory created operation and will use that factory to delete it as appropriate. Note also that an operation can be deleted and recreated in certain instances, so obey the rule of always using the operation factory to create and destroy! void addOperation | ( | Operation & | operation, |
const QString & | id | ||
) |
operation | The operation to add to the workspace. |
id | The desired ID string to use for the operation. If this ID is not used within the workspace, it will be assigned to the operation and the operation will be added to it. |
When the operation is added to the workspace using this method a check is performed on whether the workspace already has an operation with the same ID as operation. If it does, then the ID for operation is changed to some other number which is unique within that workspace. If the ID for operation is already unique, it is left unchanged.
An AddOperationEvent notification is raised as the last thing this function does.
new
. The workspace assumes an operation factory created operation and will use that factory to delete it as appropriate. Note also that an operation can be deleted and recreated in certain instances, so obey the rule of always using the operation factory to create and destroy!This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
void addToUpdateSet | ( | Updatable & | updatable | ) |
|
overrideprotectedvirtual |
b | If true, then execution should be cancelled. If false, the function should reset any internal data from a previous reset. A false parameter must be passed to this function at some point after a cancelled execution so that subclasses have a chance to reset any internal data used to implement the last cancellation. |
It is not compulsory for operations to support a specific cancel event. They can choose to do nothing in this function (which is the default implementation) or they can override this function to take some action to enact the cancellation during execution. If the function does nothing, then the operation will finish any currently running call to update(), but any subsequent calls to update() will fail. This is controlled by the workspace execution system and need not be implemented in subclasses.
If the cancellation might take some time to happen, then something should be done to indicate to the currently running update() and cancelExecution() should then return immediately without waiting for the cancellation to finish. In other words, cancelExecution() should "schedule" the cancellation rather than block waiting for it to happen.
Subclass implementors should note that the call to cancelExecution() is very likely to come from a different thread, so special care needs to be taken to avoid race conditions. It should also be noted that this function may be called when an operation is not actually executing, in which case it should do nothing.
Reimplemented from Operation.
|
virtual |
Reimplemented in MqttSubscribeLoop, ConditionalLoop, FileLoop, ForLoop, ObjectArrayLoop, TranslateObjectDictionary, ZeroMQReplyLoop, and ZeroMQSubscribeLoop.
void checkRequestersForStatus | ( | ) |
Clients should not call this function directly. It is used by WorkspaceOutput to tell a Workspace it is in that it should check to see if that Workspace can now be marked as up to date. This is done whenever a WorkspaceOutput is itself marked as up to date.
void clear | ( | ) |
Discards all connections and operations from the workspace.
Workspace * clone | ( | ) |
Returns a copy of this workspace
|
overridevirtual |
Reimplemented from Updatable.
bool completeDelayedLoad | ( | ) |
If the workspace is currently in a delayed-load state (see isDelayedLoad), this function will complete the load so that the workspace can be executed. For fully loaded workspaces, this function does nothing. This would generally only be called by core workspace code to handle nested workspaces.
bool containsOperationWithLabel | ( | const QString & | label, |
bool | descendIntoNestedItems = false |
||
) |
|
overridevirtual |
Reimplemented from Operation.
|
protected |
Decrements the workspace's reference count.
|
overridevirtual |
This function is for convenience only. Its purpose is to ensure that all the inputs to the operation have valid data objects. This can be useful, for example, just before saving the workspace to which the operation belongs, since it would ensure that values are saved for each input. If there is no valid data object, no value is saved for an input. Subclasses are permitted to override this function if they need to do specialised processing, but this would not normally be necessary. If they do, they must obey the post condition.
Reimplemented from Operation.
|
overridevirtual |
Subclasses need to implement this function to do the actual processing of the operation. Clients should not call this function directly, but should instead call the update() function, since it ensures all inputs are updated first and all outputs have setUpToDate called on each one.
Implements Operation.
Reimplemented in IteratingWorkspaceBase< ConditionalLoop, false >, IteratingWorkspaceBase< FileLoop, true >, IteratingWorkspaceBase< ForLoop, true >, IteratingWorkspaceBase< Derived, false >, IteratingWorkspaceBase< ObjectArrayLoop, false >, IteratingWorkspaceBase< Derived, true >, IteratingWorkspaceBase< TranslateObjectDictionary, true >, IteratingWorkspaceBase< MqttSubscribeLoop, false >, IteratingWorkspaceBase< ZeroMQReplyLoop, false >, and IteratingWorkspaceBase< ZeroMQSubscribeLoop, false >.
void findNestedSourceUrls | ( | QStringList & | urlList, |
bool | recursive = true |
||
) | const |
Generates a list of all urls leading to external workflows.
urlList | A list of unique urls leading to external workflows. |
recursive | Result will contain external workflows refrenced by external workflows |
|
overrideprotectedvirtual |
item | The serialized item that will be loaded. |
This function is called just before load() returns (if no errors were encountered during loading). The default implementation simply returns true to indicate that loading completed successfully. Subclasses may override this function to perform any required tasks that must be done after all other loading tasks have completed. Typical uses usually revolve around tasks that rename inputs or outputs, such as setting the data name of data sources or requesters.
Most subclasses will not need to override this function.
Reimplemented from Operation.
Reimplemented in ZeroMQReplyLoop, ZeroMQSubscribeLoop, IteratingWorkspaceBase< ConditionalLoop, false >, IteratingWorkspaceBase< FileLoop, true >, IteratingWorkspaceBase< ForLoop, true >, IteratingWorkspaceBase< Derived, false >, IteratingWorkspaceBase< ObjectArrayLoop, false >, IteratingWorkspaceBase< Derived, true >, IteratingWorkspaceBase< TranslateObjectDictionary, true >, IteratingWorkspaceBase< MqttSubscribeLoop, false >, IteratingWorkspaceBase< ZeroMQReplyLoop, false >, and IteratingWorkspaceBase< ZeroMQSubscribeLoop, false >.
AnchorData & getAnchorData | ( | const QUuid & | id | ) |
const AnchorData & getAnchorData | ( | const QUuid & | id | ) | const |
QList< QUuid > getAnchorIds | ( | ) | const |
const QString & getCatalogueName | ( | ) | const |
const QString & getCataloguePath | ( | ) | const |
Connection * getConnection | ( | size_type | i | ) |
i | The index of the connection to retrieve. |
const Connection * getConnection | ( | size_type | i | ) | const |
i | The index of the connection to retrieve. |
|
overridevirtual |
It is not required that getDefaultIconPath() always returns the same value. In fact, it can be a useful way of showing visual differences based on some property of the operation. For example, the Workspace class overrides this function and provides two different icons; one for regular workspaces and different icon for when the workspace comes from an external source.
Reimplemented from Operation.
Reimplemented in ZeroMQReplyLoop, and ZeroMQSubscribeLoop.
QList< Connection * > getDisabledConnections | ( | bool | nestedWorkspaces | ) |
Returns a list of currently disabled connections.
nestedWorkspaces | Weather to also return all of the disabled connections in nested workspaces (true) or not (false). |
|
static |
source | The source operation from which to search downstream from. |
opType | Optional type filter. If nullptr, all downstream operations will be returned. |
Returns operations down-stream of this operation (i.e. consequent in terms of execution order). Optionally accepts an operation factory which is used to filter the operations by type. Operations will be topologically sorted to align with the order in which they will be executed.
Updatable * getErrorSource | ( | ) |
const QString & getExternalSourceUrl | ( | ) | const |
void getGlobalNames | ( | QStringList & | globalNames, |
QStringList & | globalNameDescriptions | ||
) | const |
const InputScalar * getInputForOperation | ( | const WorkspaceInput & | source | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
InputScalar * getInputForOperation | ( | WorkspaceInput & | source | ) |
source | A WorkspaceInput operation which is assumed to be in this workspace. An exception will be thrown if it is not. |
const QString & getManualLoadSourceUrl | ( | ) | const |
MiniOperationRackData & getMiniOperationRackData | ( | const QUuid & | id | ) |
const MiniOperationRackData & getMiniOperationRackData | ( | const QUuid & | id | ) | const |
QUuid getMiniOperationRackId | ( | const Operation & | operation | ) | const |
operation |
QList< QUuid > getMiniOperationRackIds | ( | ) | const |
bool getMustRun | ( | ) | const |
const QString & getNamespace | ( | ) | const |
NoteItemData & getNoteItemData | ( | const QUuid & | id | ) |
const NoteItemData & getNoteItemData | ( | const QUuid & | id | ) | const |
QList< QUuid > getNoteItemIds | ( | ) | const |
const QString & getNotes | ( | ) | const |
Operation::size_type getNumConnections | ( | ) | const |
Operation::size_type getNumOperations | ( | ) | const |
i | The index of the operation to retrieve. |
This is the only reliable way to iterate over all operations in a workspace. Get the number of operations using getNumOperations() and then use getOperation() to get each one.
i | The index of the operation to retrieve. |
This is the only reliable way to iterate over all operations in a workspace. Get the number of operations using getNumOperations() and then use getOperation() to get each one.
Operation * getOperationFromId | ( | const QUuid & | id | ) |
id | The id of the operation to retrieve. |
This function searches through the list of operations held by the workspace, so avoid using this function in performance-sensitive code. In the worst case, it will visit every operation in the workspace to check its id.
const Operation * getOperationFromId | ( | const QUuid & | id | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
WorkspaceInput * getOperationFromInput | ( | InputScalar & | in | ) | const |
Each input of the actual Workspace operation corresponds to a WorkspaceInput operation within that Workspace through which some other nested operation will be passing its data through.
in | The input on this Workspace operation |
WorkspaceOutput * getOperationFromOutput | ( | const Output & | out | ) | const |
Each output of the actual Workspace operation corresponds to a WorkspaceOutput operation within that Workspace through which some other nested operation will be passing its data through.
out | The output on this Workspace operation |
Operation::size_type getOperationIndex | ( | const Operation & | op | ) | const |
op | The operation for which we wish to return its index. |
QList< Operation * > getOperationsWithFeature | ( | const SchedulerFeature & | feature, |
bool | descendIntoNestedItems = false |
||
) |
QList< Operation * > getOperationsWithLabel | ( | const QString & | label, |
bool | descendIntoNestedItems = false |
||
) |
CSIRO::DataExecution::Operation * getOperationWithGlobalName | ( | const QString & | globalName, |
bool | descendIntoNestedItems = false |
||
) |
Operation * getOperationWithLabel | ( | const QString & | label | ) |
const Output * getOutputForOperation | ( | const WorkspaceOutput & | requester | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Output * getOutputForOperation | ( | WorkspaceOutput & | requester | ) |
requester | A WorkspaceOutput operation which is assumed to be in this workspace. An exception will be thrown if it is not. |
|
overridevirtual |
Reimplemented from Operation.
|
overridevirtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented from Updatable.
|
overridevirtual |
Reimplemented from Updatable.
const QString & getSerializedText | ( | ) | const |
QString getSourceDir | ( | ) | const |
|
inline |
bool getSupportsRemoteExecution | ( | ) | const |
const QString & getSyncSerializedWorkflow | ( | ) | const |
Return the sync'ed source Workspace that was saved as a serialized text. This workflow was saved as a serialized text before it was meant to be deserialized later.
Updater & getUpdater | ( | ) |
|
static |
const QString & getUuid | ( | ) |
This UUID is only used for distributed scheduling purposes and will probably be removed in future. Use getId() for the actual operation QUuid.
QList< Variable * > getVariableOperations | ( | ) |
QList< const Variable * > getVariableOperations | ( | ) | const |
QList< WorkspaceInput * > getWorkspaceInputOperations | ( | ) |
QList< const WorkspaceInput * > getWorkspaceInputOperations | ( | ) | const |
QList< WorkspaceOutput * > getWorkspaceOutputOperations | ( | ) |
QList< const WorkspaceOutput * > getWorkspaceOutputOperations | ( | ) | const |
QList< Workspace * > getWorkspaces | ( | ) |
QList< const Workspace * > getWorkspaces | ( | ) | const |
QList< Workspace * > getWorkspacesWithSourceUrl | ( | const QString & | sourceUrl, |
bool | descendIntoNestedItems = false |
||
) |
bool hasDisabledConnections | ( | ) | const |
Determines whether this workspace has any disabled connections.
bool hasStarted | ( | ) |
Returns true if the workspace has started executing
bool hasStopped | ( | ) |
Returns true if the workspace has stopped executing
bool haveAnchor | ( | const QUuid & | id | ) | const |
bool haveMiniOperationRack | ( | const QUuid & | id | ) | const |
bool haveNoteItem | ( | const QUuid & | id | ) | const |
|
overridevirtual |
Sub-classes should override this if they want to control notifications in response to ancestry changes.
Reimplemented from Operation.
|
protected |
Increments the workspace's reference count.
void inputDataTypeChanged | ( | WorkspaceInput & | source | ) |
|
overridevirtual |
Reimplemented from Operation.
|
overridevirtual |
Reimplemented from Operation.
|
overridevirtual |
bool isDelayedLoad | ( | ) | const |
A delayed load state is when a workspace has been loaded from an external location, but doing so caused a recursive definition of the workspace. To allow the workspace to still be valid, the actual loading of it is delayed until something actually requires it to be executed. Only the workspace's inputs and outputs are created, and the loading of all other operations it contains is delayed. The rest of the operations are loaded when something triggers the workspace's outputs to be updated.
This allows recursion to an arbitrary level by only creating as many recursion levels as needed.
bool isPaused | ( | ) |
bool isRunning | ( | ) |
|
overridevirtual |
Reimplemented from Operation.
bool isScheduled | ( | ) |
bool isValid | ( | ) | const |
Recurses through the workspace's contents to determine whether the workspace is valid, and therefore, whether it is able to be executed. Returns true when there are no invalid connections (i.e. connections between incompatible types), and no operations of type Placeholder.
|
overridevirtual |
|
overridevirtual |
item | The serialized data to load into the Workspace. |
Loads the serialized item, expecting it to be a structured Workspace DOM. This function is exactly the same as operation, except that it sets the active OperationIdRegistry to help ensure that any legacy ids are converted into uuids.
Reimplemented from Operation.
bool loadFromFile | ( | const QString & | fileName, |
bool | loadPlaceholdersOnly = false , |
||
bool | updateWsResourcePath = true |
||
) |
fileName | The file that contains the serialized Workspace to be loaded. |
loadPlaceholdersOnly | If true, load all operations as placeholders, with the exception of nested Workspaces, WorkspaceInput and WorkspaceOutput operations. |
updateWsResourcePath | If true, update the WS: resource path to correspond to the directory containing fileName. |
If fileName is a relative path, then two locations will be searched for a file to read. The first location is the same directory as where the parent workspace came from (if there is a parent workspace). This is controlled by the most immediate parent in the workspace hierarchy that has its source URL or manual load source URL set. If either of these are also relative, the final location is built up by checking further up the workspace hierarchy until a non-relative path can be formed. If no file is found to exist at the first location, then fileName is taken to be relative to the current directory. If no file is found at that location either, the call fails.
If the fileName is not a relative path (ie it is an absolute path or a Qt resource path), it is used as is without modification. Note that a Qt resource path can never be relative.
Calling this function also sets the manual load source URL. Any previous contents of the workspace will have been cleared before loading in the new contents from the specified file.
bool loadMetaData | ( | const QString & | serializedText | ) |
This function only loads some meta data of the workflow from its saved serialized text. A use case is when workspace-server receives the workflow (as serialized text via the network) and needs the workflow meta data for its scheduling but does not and cannot load the entire workflow. In this case the entire workflow with all inputs outputs data will be loaded later from its saved serialized text by workspace-batch.
bool loadWithoutOverwrite | ( | const SerializedItem & | item | ) |
item | The item to load into this workspace. It is assumed that item is a Workspace description, so only the children of item are added to this workspace. |
The difference between loadWithoutOverwrite() and load() is that load() will clear the existing contents first, whereas loadWithoutOverwrite() will not. As a result of this, to make sure that there are no id conflicts, the function will regenerate the ids of any operations that are added, and store the old->new mapping in replacedIds.
Note also that load() will populate the values of the workspace inputs and outputs, whereas loadWithoutOverwrite() will not. This is because loadWithoutOverwrite() is meant for loading operations other than data sources and requesters into an existing workspace. The only client code expected to use this function is that related to clipboard handling (eg PasteFromClipboard).
This function assumes this workspace is not in a delay-loaded state. This should only occur if the workspace is an external reference and that externally referenced workspace is recursive. Attempting to call loadWithoutOverwrite() on such a workspace is not recommended, since you technically should not be modifying a workspace that is an external reference anyway.
void logText | ( | const QString & | msg | ) |
|
overrideprotectedvirtual |
Reimplemented from Operation.
void modifyAnchor | ( | const QUuid & | id, |
const AnchorData & | d | ||
) |
void modifyNoteItem | ( | const QUuid & | id, |
const NoteItemData & | d | ||
) |
bool nestedHaveDisabledConnections | ( | ) | const |
Determines whether any nested workspaces have any disabled connections.
This function does not check the current workspace, see Workspace::hasDisabledConnections() if you also want to check the current workspace.
|
protected |
|
protected |
|
protected |
void outputDataTypeChanged | ( | WorkspaceOutput & | requester | ) |
void pauseUpdate | ( | ) |
|
overrideprotectedvirtual |
item | The serialized item in which to save additional data. |
This function saves the operations, connections and connection anchors of the workspace.
Reimplemented from Operation.
|
overrideprotectedvirtual |
item | The serialized item that will be loaded. |
Workspaces have their inputs defined by the presence of WorkspaceInput operations they hold. Similarly, their outputs are defined by the presence of WorkspaceOutput operations. This means that before the values of a workspace's inputs (and outputs for backwards compatibility reasons) can be loaded, those inputs must exist. This in turn implies that the contents of the workspace must be loaded first. The Workspace class reimpliments prepareInputsOutputsForLoad() to ensure that the data sources and requesters are loaded. If possible, the function will fully populate the workspace from the serialized data in item too, or else the rest of the data will be populated when something asks one of its WorkspaceOutput's to update.
Reimplemented from Operation.
Reimplemented in ZeroMQReplyLoop, ZeroMQSubscribeLoop, IteratingWorkspaceBase< ConditionalLoop, false >, IteratingWorkspaceBase< FileLoop, true >, IteratingWorkspaceBase< ForLoop, true >, IteratingWorkspaceBase< Derived, false >, IteratingWorkspaceBase< ObjectArrayLoop, false >, IteratingWorkspaceBase< Derived, true >, IteratingWorkspaceBase< TranslateObjectDictionary, true >, IteratingWorkspaceBase< MqttSubscribeLoop, false >, IteratingWorkspaceBase< ZeroMQReplyLoop, false >, and IteratingWorkspaceBase< ZeroMQSubscribeLoop, false >.
void processUpdateSet | ( | ) |
void regenerateOperationIds | ( | ) |
Regenerates the IDs of all operations contained in the workspace.
bool removeAnchor | ( | const QUuid & | id | ) |
bool removeConnection | ( | Connection & | connection | ) |
connection | The connection to be removed from the workspace. |
The connection will not be deleted, just removed from the workspace's internal list of connections it contains. This function would typically only be used by developers who are manipulating the contents of a workspace directly.
A RemoveConnectionEvent notification will be raised just before any change is made to connection and before it is removed from the workspace. If connection is not present in the workspace, no event notification will be made.
void removeFromUpdateSet | ( | Updatable & | updatable | ) |
bool removeMiniOperationFromRack | ( | const QUuid & | opId, |
const QUuid & | rackId | ||
) |
bool removeMiniOperationRack | ( | const QUuid & | id | ) |
bool removeNoteItem | ( | const QUuid & | id | ) |
bool removeOperation | ( | Operation & | operation | ) |
operation | The operation to be removed from the workspace. |
The operation will not be deleted, just removed from the workspace's internal list of operations it contains. This function would typically only be used by developers who are manipulating the contents of a workspace directly.
A RemoveOperationEvent notification will be raised just before any change is made to operation and before it is removed from the workspace. If operation is not present in the workspace, no event notification will be made.
void requestContinuousUpdate | ( | ) |
Requests a continuous update of the workspace.
void requestSingleShotUpdate | ( | const QJsonDocument & | requestSettings | ) |
Request a single update of the workspace with JSON request settings.
SchedulerRequest has defined a few request settings. Such as,
notifyMail
: array of email addresses to send notification mail at the end of executiondebugWithGui
: boolean, true would start workspace-gui instead of workspace-batchusedPluginsOnly
: boolean, true to avoid loading plugins not used in a workflowlogCategory
: JSON object of { "log category name": bool } to override log settings on the server sidecommandLine
: JSON object, the job is a command line instead of a workflow. The element in commandLine
:executablePath
: string to locate an executable on the server sideargs
: array of string, arguments pass to the command lineworkingDir
: string of the working directoryenvironmentVariables
: JSON object of { key: value } key is the env variable and value is the value as a stringwallTime
: Some request settings are defined by specific schedulers. For example, in the Out of Process (OOP) scheduler, we have:OOPScheduler::requestSettingsWalltimeSeconds
: Accepts a numeric value to define a job's maximum execution time in seconds.OOPScheduler::requestSettingsWalltimeTimestampEpoch
: Accepts a string representing a timestamp in seconds since Epoch, which should be a time in the future. An earlier wall time would be used to abort a job scheduled via the OOP scheduler. void requestSingleShotUpdate | ( | const QStringList & | notifyMailRecipients = QStringList() | ) |
Requests a single update of the workspace.
void requestStop | ( | ) |
Stops execution of the workspace asynchronously.
|
overridevirtual |
When a workspace is being updated continuously, it notifies interested clients each time. The usual arrangement is for an observer to call resetExecutionDependencies for each notification.
Reimplemented from Operation.
bool saveToFile | ( | const QString & | fileName, |
bool | saveData = false , |
||
bool | saveAllOutputs = true |
||
) |
fileName | The name of the file to write the serialized form of the Workspace to. Unlike for loadFromFile(), the fileName must be on the local filesystem. |
saveData | A flag to indicate that data associated with any outputs within either the workspace or the operations it contains should be saved. |
saveAllOutputs | A flag to indicate that all outputs are saved, or otherwise, only top level outputs are saved. |
bool saveToFileConst | ( | const QString & | fileName, |
bool | saveData = false |
||
) | const |
fileName | The name of the file to write the serialized form of the Workspace to. Unlike for loadFromFile(), the fileName must be on the local filesystem. |
saveData | A flag to indicate that data associated with any outputs within either the workspace or the operations it contains should be saved. |
|
overridevirtual |
item | Where content of the Workspace saved to. |
Reimplemented from Operation.
bool saveWithData | ( | SerializedItem & | item, |
bool | saveAllOutputs | ||
) | const |
item | Where content of the Workspace saved to. |
saveAllOutputs | True to save all outputs, False to only save top-level outputs. |
|
overridevirtual |
atomic | Sets whether this workspace behaves as an atomic operation. |
Reimplemented from Operation.
void setCatalogueName | ( | const QString & | name | ) |
name | The name to use for this workspace if it is added to a workspace collection. This is the name that will be shown for it in the operation catalogue. |
void setCataloguePath | ( | const QString & | path | ) |
path | The path to use for this workspace if it is added to a workspace collection. This is the tree path under which it will appear in the operation catalogue. Use forward slashes to separate levels of the tree. |
void setExternalSourceUrl | ( | const QString & | url | ) |
url | The external URL this workspace should act as a wrapper for. |
If url is an empty string, the workspace does not act as a wrapper and instead it will load and save the workspace contents directly. If url is not an empty string, then this workspace acts as a wrapper around whatever url points to. This allows a workspace to quickly and easily import another externally defined workspace as an operation. The external workspace could even be stored centrally on a file system and shared among multiple users. Each user would only need their own workspace to act as a wrapper around the external workspace. If url is not empty, then the manual load source URL is cleared.
|
inline |
globalName | The globalName of the attached IOBase which is being assigned to. The globalName must be attached to a scalar input in the workspace itself, or one of its sub-workspaces. |
value | The value to assign to the target IOBase. |
Finds the IOBase with the specified globalname in the workspace, and assigns the specified value to it. Success is dependent on the following factors:
|
overridevirtual |
b | Whether or not to enable IdPath caching. |
If enabled, the workspace will cache its IdPath both in memory and in serialised form. If the workspace is going to be executed in a distributed environment away from its in-memory parent workflow, a cached ID path is necessary, however, rather than imposing this memory / file size encumbrance on all operations, we make it an opt-in.
Note that if a Workspace is caching IdPaths, all of its child operations will be set to cache their IdPaths as well.
Reimplemented from Operation.
|
static |
|
overridevirtual |
input | The input making the request for the status to be changed. |
The Workspace needs to forward this status change request to the WorkspaceInput corresponding to input within itself.
Reimplemented from Operation.
Reimplemented in ZeroMQReplyLoop, ZeroMQSubscribeLoop, IteratingWorkspaceBase< ConditionalLoop, false >, IteratingWorkspaceBase< FileLoop, true >, IteratingWorkspaceBase< ForLoop, true >, IteratingWorkspaceBase< Derived, false >, IteratingWorkspaceBase< ObjectArrayLoop, false >, IteratingWorkspaceBase< Derived, true >, IteratingWorkspaceBase< TranslateObjectDictionary, true >, IteratingWorkspaceBase< MqttSubscribeLoop, false >, IteratingWorkspaceBase< ZeroMQReplyLoop, false >, and IteratingWorkspaceBase< ZeroMQSubscribeLoop, false >.
|
overridevirtual |
asynchronous | Sets whether this workspace runs asynchronously |
Reimplemented from Operation.
|
overridevirtual |
running | Sets whether this workspace runs asynchronously |
Reimplemented from Operation.
void setIsScheduled | ( | bool | scheduled | ) |
void setManualLoadSourceUrl | ( | const QString & | url | ) |
url | The url or file name that this workspace should be considered to have been loaded from. |
The manual load source url is meant to signify where a workspace came from without recording that information in any serialized form of the workspace. It would normally only be set just before client code loads a top level workspace from disk or when saving a top level workspace.
Client code would not normally need to call setManualLoadSourceUrl() directly, since it is called automatically by loadFromFile(), which is the function that client code would normally use for such scenarios. It may need to be called directly if, for example, client code loads an XML project file directly and then wants to load that serialized description into a workspace. While valid, this is not the recommended approach and should only be done if the desired behaviour cannot be achieved using loadFromFile().
This function sets different information to what setExternalSourceUrl() sets. The setExternalSourceUrl() function specifies where to load the contents of the workspace from when it is loaded. When saving, having the source url set by setExternalSourceUrl() will prevent the contents of the workspace from being saved, since the contents will be read from the external source when it needs to be populated. Compare this to setManualLoadSourceUrl() which specifies where the existing contents came from.
If this workspace has a parent workspace, calling setManualLoadSourceUrl() will have no effect. This is because the workspace is essentially owned by its parent and therefore comes from wherever its parent came from.
void setMustRun | ( | bool | mustRun | ) |
Indicates that the Workspace must run irrespective of any concurrency limit.
void setNamespace | ( | const QString & | name | ) |
void setNotes | ( | const QString & | notes | ) |
notes | The new notes for the workspace. Any valid HTML code is acceptable, with the understanding that it will be placed within <html><body> tags. Any HTML supported by QWebPage should be considered valid. |
If notes is different to the current notes, a WorkspaceNotesEvent notification will be raised.
|
overridevirtual |
output | The output making the request for the status to be changed. |
The Workspace needs to forward this status change request to the WorkspaceOutput corresponding to output within itself. It will also mark the workspace as not up to date.
Reimplemented from Operation.
void setOutputUpToDate | ( | WorkspaceOutput & | requester, |
bool | b | ||
) |
|
inline |
void setSupportsRemoteExecution | ( | bool | val | ) |
void setSynchronisationSource | ( | Workspace & | src | ) |
Sets a Workspace that is to be used to synchronise data from
void setSyncSerializedWorkflow | ( | const QString & | serializedWorkflow | ) |
Sets a Workspace (as serialized text) that is to be used to synchronise data from
|
overridevirtual |
Override Operation::setUpToDate(). Notify WorkspaceOutOfDateEvent when becoming out of date.
Reimplemented from Operation.
void setUuid | ( | const QString & | uuid | ) |
This UUID is only used for distributed scheduling purposes and will probably be removed in future. Use setId() for the actual operation QUuid.
void setWasRunning | ( | bool | b | ) |
|
overrideprotectedvirtual |
tagName | The tag name being queried. |
Workspaces can have operation
and connection
tags of their own. These define the contents of the workspace and will be processed by the workspace during a call to save() or load(). Therefore, these should be omitted from the extras data, which is what this reimplimentation does.
Reimplemented from Operation.
void stopAndWaitUntilFinishedRunning | ( | ) |
Stops execution of the workspace and waits (i.e. blocks) until the workspace has finished executing. As this method is a blocking method and blocks until a workspace has finished running, it should not be called from a method initiated from within the workspace's run loop. This means it should not be called in response to notified workspace execution events directly as these are invoked by the workspace's run loop and so as long as the caller IS the workspace run loop, the workspace will always be running.
bool synchronize | ( | ) |
Requests the Workspace synchronise itself from a previously supplied synchronisation source
void terminate | ( | ) |
|
overridevirtual |
bool wasRunning | ( | ) |
|
overridevirtual |
oldWorkspace | The previous workspace before it was changed. |
Sub-classes should override this if they want to be notified whenever setWorkspace is called with a workspace different to the currently assigned workspace. The last thing setWorkspace will do before returning is call workspaceChanged with the old workspace as the parameter (this could be a null pointer).
Client code can also call this function if they change something which affects the workspace and which may affect operations in it. An example might be when a workspace has its own parent workspace set, so all WorkspaceInput operations need to be notified so they can change their internal data routing to reflect this.
Reimplemented from WorkspaceElement.
|
static |