Operation factory class template.
More...
#include <Workspace/DataExecution/Operations/typedoperationfactory.h>
template<typename T>
class CSIRO::DataExecution::TypedOperationFactory< T >
Client code should never refer to this class directly. It should always use the OperationFactoryTraits class instead. The OperationFactoryTraits member function are usually sufficient, or access to this factory can be obtained via the OperationFactoryTraits::getInstance() function which returns a pointer to the base class of the factory.
◆ create()
◆ destroy()
- Parameters
-
The default implementation uses operator delete
to destroy op. If you provided your own create() function, then ensure that the destroy() function you also provided is consistent with how you create T objects. In general, this means if you create them with operator new
, then you should delete them with operator delete
.
This implementation also performs a check that op is of the expected operation type by comparing the factory returned from the operation's getFactory() function with this factory. If the compilation has debugging enabled, an assertion will be triggered, otherwise the call is forwarded to op's factory instead.
- See also
- create()
Implements OperationFactory.
◆ getCataloguePath() [1/2]
QString getCataloguePath |
( |
| ) |
const |
|
virtual |
- Returns
- A path indicating where the operation should appear in the catalogue hierarchy. This is case-sensitive.
A path may only include letters, numbers, underscores and spaces. The forward slash character (/) is used to separate levels in the catalogue, similar to how directories are separated in a path for file systems.
Unlike the type and module names, the catalogue path can be changed without affecting the loadability of existing workspaces. It is only used to help the user find it in user interfaces.
Implements OperationFactory.
◆ getCataloguePath() [2/2]
QString getCataloguePath |
( |
| ) |
const |
|
overridevirtual |
- Returns
- A path indicating where the operation should appear in the catalogue hierarchy. This is case-sensitive.
A path may only include letters, numbers, underscores and spaces. The forward slash character (/) is used to separate levels in the catalogue, similar to how directories are separated in a path for file systems.
Unlike the type and module names, the catalogue path can be changed without affecting the loadability of existing workspaces. It is only used to help the user find it in user interfaces.
Implements OperationFactory.
◆ getDefaultIconPath() [1/2]
QString getDefaultIconPath |
( |
| ) |
const |
|
virtual |
- Returns
- The file or resource location of the default icon for operations created by this factory.
It is recommended that this path be a Qt resource path. Example: "images:/myoperation.png"
Implements OperationFactory.
◆ getDefaultIconPath() [2/2]
QString getDefaultIconPath |
( |
| ) |
const |
|
overridevirtual |
- Returns
- The file or resource location of the default icon for operations created by this factory.
It is recommended that this path be a Qt resource path. Example: "images:/myoperation.png"
Implements OperationFactory.
◆ getDeprecationMessage()
QString getDeprecationMessage |
( |
| ) |
const |
|
inlineoverridevirtual |
- Returns
- If this operation is deprecated, a string containing the message to display (usually a reason for this operation being deprecated, plus the name of its replacement, if one exists). If the operation is not deprecated, an empty string will be returned.
Implements OperationFactory.
◆ getPlugin() [1/2]
- Returns
- The WorkspacePlugin instance which provides this operation factory.
Implements OperationFactory.
◆ getPlugin() [2/2]
- Returns
- The WorkspacePlugin instance which provides this operation factory.
Implements OperationFactory.
◆ getSourceTreeTop()
QString getSourceTreeTop |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ getType() [1/2]
QString getType |
( |
| ) |
const |
|
virtual |
- Returns
- A name identifying the type of operation created by this factory. It must be unique among all operations supplied by this plugin. This is case-sensitive.
Subclass implementors should not change the value returned by this function if it can be avoided, as doing so makes all existing saved workspaces no longer loadable.
- See also
- getPlugin()
Implements OperationFactory.
◆ getType() [2/2]
QString getType |
( |
| ) |
const |
|
overridevirtual |
- Returns
- A name identifying the type of operation created by this factory. It must be unique among all operations supplied by this plugin. This is case-sensitive.
Subclass implementors should not change the value returned by this function if it can be avoided, as doing so makes all existing saved workspaces no longer loadable.
- See also
- getPlugin()
Implements OperationFactory.
◆ isDeprecated()
bool isDeprecated |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ isWorkspaceType() [1/2]
bool isWorkspaceType |
( |
| ) |
const |
|
virtual |
- Returns
- True if the operation is a workspace type (i.e. a type that derives from the Workspace class and should be treated in workflows as a specialised type of nested workflow).
Implements OperationFactory.
◆ isWorkspaceType() [2/2]
bool isWorkspaceType |
( |
| ) |
const |
|
overridevirtual |
- Returns
- True if the operation is a workspace type (i.e. a type that derives from the Workspace class and should be treated in workflows as a specialised type of nested workflow).
Implements OperationFactory.