|
| InputArray (const QString &name, DataObject &obj, Operation &op, bool modifiedInPlace=false) |
|
| ~InputArray () override |
|
virtual InputScalar & | addInput (difference_type beforeIndex=-1) |
|
iterator | begin () |
|
const_iterator | begin () const |
|
bool | canConnect (const DataFactory &factory) const override |
|
bool | canSerialize () const override |
|
bool | connected () const override |
|
void | disconnect () override |
|
bool | empty () const |
|
iterator | end () |
|
const_iterator | end () const |
|
void | ensureHasData () override |
|
virtual void | eraseAllInputs () |
|
virtual void | eraseInput (InputScalar &input) |
|
Connection * | getConnection () override |
|
QString | getDataPathUsingId (bool scoped=true) const override |
|
ObjectArray | getElementDataAsObjectArray () |
|
virtual difference_type | getIndex (const Connection &connection) const |
|
virtual difference_type | getIndex (const InputScalar &input) const |
|
InputScalar & | getInput (size_type i) |
|
const InputScalar & | getInput (size_type i) const |
|
template<typename T > |
QList< T * > | getRawElementData () |
|
template<typename T > |
QList< const T * > | getRawElementData () const |
|
IOBaseType | getType () const override |
|
bool | getUpToDate () const override |
|
bool | isConnectedToAsynchronous () const override |
|
bool | isModifiedInPlace () const override |
|
bool | isScalar () const override |
|
bool | isWaitingForAsynchronousUpdate () const override |
|
bool | load (const SerializedItem &item) override |
|
| operator InputScalar ** () const |
|
InputScalar & | operator[] (size_type i) |
|
const InputScalar & | operator[] (size_type i) const |
|
bool | save (SerializedItem &item) const override |
|
void | setUpToDate (bool b) override |
|
size_type | size () const |
|
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 |
|
Array inputs differ from scalar inputs in that more than one output can be connected to it. An input array is implemented as an array of InputScalar objects.
Input arrays generate event notifications when elements are added or removed from the array. This allows clients to respond to the input array changing size and having elements come and go. This capability is particularly useful for widgets that form some sort of visual representation of the input array (see OperationIOWidget for a good example).
- See also
- InputElementAddedEvent, InputElementRemovalEvent
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.
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.
bool update |
( |
Updater * |
updater = nullptr | ) |
|
|
overridevirtual |
- Parameters
-
updater | The execution thread that is calling the function. When the object is being updated from within a workspace, this parameter will normally hold the execution thread that is calling this function. If the object is not part of a workspace or is being updated from client code directly in some other way, this parameter should be a null pointer to indicate that execution is not under the control of an Updater object. This is crucial for robust handling of things like logging messages. |
Calling this function attempts to bring the object up to date. For objects connected in a workspace, this must first bring all upstream dependencies up to date as required. Some updatables can update themselves asynchronously. In such instances update() will return false if an updatable is still being updated (asynchronously). In order to determine if an update() returned false because of a genuine failure or because the update is asynchronous (and still in progress) the isWaitingForAsynchronousUpdate() method should be queried to help determine the cause of the update failure.
- Returns
- True if the update was successful.
- Postcondition
- Exactly what "up to date" means is up to the subclass, but if update() returns true, then getUpToDate() must also return true immediately after update() returns.
- See also
- setUpToDate(), getUpToDate(), isWaitingForAsynchronousUpdate()
Calling this function ensures that the input or output holds a valid, up to date data object. If this is an input with a connection, that connection will be updated as required. If this is an input with no connection and the input is not an array, a valid data object must still be created which can be assigned to or read from. For outputs, this will essentially just forward the request to the operation it is associated with.
- See also
- notifyUpdated()
Implements IOBase.