All objects that can be created on a workspace must be derived from this.
More...
#include <Workspace/DataExecution/Operations/workspaceelement.h>
◆ WorkspaceElement()
Constructs a workspace element with a default ID of 0. The correct log mode and log stream is automatically set. The workspace element is created as an orphan, meaning that it is not assigned to any particular workspace.
◆ ~WorkspaceElement()
Cleans up the private implementation obect.
◆ getWorkspace() [1/2]
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implements Updatable.
◆ getWorkspace() [2/2]
- Returns
- The workspace which owns this element, or a null pointer if no workspace currently owns it.
Implements Updatable.
◆ workspaceChanged()
virtual void workspaceChanged |
( |
Workspace * |
oldWorkspace | ) |
|
|
inlinevirtual |
- Parameters
-
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.
- Warning
- The workspace oldWorkspace used to point to might no longer exist, so it is not safe to dereference this pointer.
Reimplemented in WorkspaceInput, WorkspaceOutput, and Workspace.