Scalar input class (only one output can connect to it at a time).
|
| InputScalar (const QString &name, DataObject &obj, InputArray &owner) |
|
| InputScalar (const QString &name, DataObject &obj, Operation &op, bool modifiedInPlace=false) |
|
| ~InputScalar () override |
|
void | addConnection (Connection &connection) |
|
template<typename T > |
void | assign (const T &t) |
|
bool | canConnect (const DataFactory &factory) const override |
|
bool | canSerialize () const override |
|
bool | connected () const override |
|
void | disconnect () override |
|
void | ensureHasData () override |
|
const Connection * | getConnection () const |
|
Connection * | getConnection () override |
|
QString | getDataPathUsingId (bool scoped=true) const override |
|
InputArray * | getOwner () |
|
const InputArray * | getOwner () const |
|
template<typename T > |
T & | getRawData () |
|
template<typename T > |
const T & | getRawData () const |
|
IOBaseType | getType () const override |
|
bool | getUpToDate () const override |
|
bool | isConnectedToAsynchronous () const override |
|
virtual bool | isFactoryCompatible (const DataFactory &factory) const |
|
bool | isModifiedInPlace () const override |
|
bool | isScalar () const override |
|
bool | isWaitingForAsynchronousUpdate () const override |
|
bool | load (const SerializedItem &item) override |
|
void | markUpToDateWhereSafe () override |
|
bool | rebuilt () |
|
void | removeConnection () |
|
bool | save (SerializedItem &item) const override |
|
void | setUpToDate (bool b) override |
|
bool | update (Updater *updater=nullptr) override |
|
| ~Input () override |
|
virtual bool | canConnect (const DataFactory &factory) const =0 |
|
virtual void | ensureHasData ()=0 |
|
virtual Connection * | getConnection ()=0 |
|
bool | getIgnoreModifiedInPlaceDependency () const |
|
QString | getTagName () const override |
|
virtual bool | isModifiedInPlace () const =0 |
|
virtual bool | isScalar () const =0 |
|
void | setIgnoreModifiedInPlaceDependency (bool ignore) |
|
| ~IOBase () override |
|
void | addConnectorThatRequiresQueuing () |
|
void | clearWidgetPropertyValues () |
|
virtual bool | connected () const =0 |
|
virtual void | disconnect ()=0 |
|
bool | getAllowedToSerialize () const |
|
DataObject & | getDataObject () |
|
const DataObject & | getDataObject () const |
|
virtual QString | getDataPath () const |
|
virtual QString | getDataPathUsingId (bool scoped=true) const |
|
const QString & | getDeprecationMessage () const |
|
const QString & | getDescription () const |
|
const DataFactory & | getFactory () const |
|
IOBase * | getFromPath (const QString &path, Workspace &relativeTo, QStringList &errors) const override |
|
QString | getIdPath (bool scoped=true) const override |
|
const QString & | getName () const |
|
Operation * | getOperation () |
|
const Operation * | getOperation () const |
|
const QString & | getPreferredWidget () const |
|
const Workspace * | getRootWorkspace () const override |
|
Workspace * | getRootWorkspace () override |
|
virtual QString | getTagName () const =0 |
|
virtual IOBaseType | getType () const =0 |
|
bool | getUpToDate () const override=0 |
|
bool | getVisible () const |
|
const QMap< QString, QVariant > & | getWidgetPropertyValueMap (const QString &widgetClassName) const |
|
QValidator * | getWidgetValidator () |
|
const QValidator * | getWidgetValidator () const |
|
const Workspace * | getWorkspace () const override |
|
Workspace * | getWorkspace () override |
|
bool | isDeprecated () const |
|
void | markAsDeprecated (bool b, const QString &message="") |
|
virtual void | markUpToDateWhereSafe () |
|
void | removeConnectorThatRequiresQueuing () |
|
void | setAllowedToSerialize (bool b) |
|
void | setDataObject (DataObject &obj) |
|
void | setDescription (const QString &description) |
|
void | setName (const QString &name) |
|
void | setOperation (Operation *op) |
|
void | setPreferredWidget (const QString &name) |
|
void | setUpToDate (bool b) override=0 |
|
void | setVisible (bool b) |
|
void | setWidgetPropertyValue (const QString &widgetClassName, const QString &propertyName, const QVariant &value) |
|
void | setWidgetValidator (QValidator *validator) |
|
bool | shouldQueueChangesWhileUpdating () const |
|
bool | update (Updater *updater=nullptr) override=0 |
|
| ~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 |
|
void assign |
( |
const T & |
t | ) |
|
|
inline |
- Parameters
-
t | The object to be assigned to the input. The underlying type of t must support the assignment operator. |
If the data object for this input has not yet been created, it will be created as part of this call. Thus, the function provides a very convenient way to set values of operation inputs.
The up to date status of the input is left unchanged by this function. If the input has no connection, then it will retain the value assigned to it here when it is updated. If the input does have a connection, then the value you assign here will be discarded.
- See also
- getRawData()
Ensures that the underlying data is a valid object(s). For array inputs, all array elements will have valid data objects after this call.
Note that this call may need to trace back through connections in order to guarantee that the data for this input is valid, since the data may be supplied by a connection. Depending on the connection types and workspace elements involved, this could chain back through a substantial part of the workspace.
This function is not strictly necessary, since scalar inputs provide the data object they hold and array inputs can be iterated over to do the same. The ensureHasData function here is merely a convenience for providing one place to do this for all input types.
Implements Input.
QString getDataPathUsingId |
( |
bool |
scoped = true | ) |
const |
|
overridevirtual |
- Parameters
-
scoped | If true then return full scope of the item. If false, only return identifier local to its workflow. |
- Returns
- The data path of the input/output using an operation ID path. The default implementation returns an empty string, which means an invalid data path (ie the input/output cannot support data manipulation).
Client code would not normally call this function, but rather would call getDataPath() instead because that function prefers to return the global name form of data path. A global name data path is more flexible than an operation ID data path, but it also has potential non-uniqueness issues if a global name is used more than once. A data path based on an operation ID path, on the other hand, is always unique, but it is broken by operations being moved to a different workspace or by them (or any parent workspace) being renumbered.
- See also
- getDataPath()
Reimplemented from IOBase.
void markUpToDateWhereSafe |
( |
| ) |
|
|
overridevirtual |
This function can be called after client code modifies the data of this input/output. It's purpose is to try to mark the input/output as up to date if it can be determined that it is safe to do so. This allows the input/output to potentially be brought up to date sooner than would otherwise occur, such as having to wait until an execution thread is started. One of the cases where this proves useful is when loading in data while a workspace is not executing and wanting widgets attached to the inputs/outputs to immediately show the modified values. Without this feature, the values would still be changed but the widgets would not reflect the change until after the execution thread is started and gets around to bringing the inputs and outputs up to date.
The default implementation of this function is to do nothing. Subclasses should only mark themselves as up to date if they do not depend on anything, such as an Operation or a connection with the input as its destination. They must also handle the execution thread correctly by ensuring that the up to date state is only modified directly if no execution thread is running.
Reimplemented from IOBase.
void setUpToDate |
( |
bool |
b | ) |
|
|
overridevirtual |
- Parameters
-
b | Boolean value specifying the new up-to-date status of the object. |
- Precondition
- If this object belongs to a workspace and that workspace's execution thread is running, setUpToDate() must only be called from that execution thread. If the execution thread is not running or there is no execution thread (or perhaps not even a workspace), then setUpToDate() may be called from any thread with appropriate thread protection being the responsibility of the caller.
If b is false, the call must also try to propagate forward the not up-to-date status through the workspace. The forward propagation must continue until it reaches something already not up to date. Note that for container-type objects (eg array inputs), the up-to-date status is controlled by all items in the container, so calling setUpToDate() doesn't actually change the status for a container as a whole. In that case, all it does is propagate forward the status as necessary.
Note that when is true, some subclasses may choose to raise some kind of event notification to let clients know that they have been brought up to date. Since this will have an impact on performance even if nothing is observing the event, subclasses should avoid making such notifications if it is not necessary.
- See also
- update(), getUpToDate()
Inputs and outputs do generate event notifications when setUpToDate() is called with a true parameter. In such cases, subclasses will normally call notifyUpdated() in their implementation of setUpToDate().
Implements IOBase.