HydroCouple  1.0.0
Description of the HydroCouple Component-Based Model Coupling Interface Definitions
HydroCouple::IOutput Class Referenceabstract

An output exchange item that can deliver values from an IModelComponent. More...

#include <hydrocouple.h>

Inheritance diagram for HydroCouple::IOutput:
Collaboration diagram for HydroCouple::IOutput:

Public Member Functions

virtual ~IOutput ()
 
virtual QList< IInput * > consumers () const =0
 Input items that will consume the values, by calling the GetValues() method. More...
 
virtual void addConsumer (IInput *consumer)=0
 Add a consumer to this output item. Every input item that wants to call the IValueSet::getValue() method, needs to add itself as a consumer first. More...
 
virtual bool removeConsumer (IInput *consumer)=0
 Remove a consumer. More...
 
virtual QList< IAdaptedOutput * > adaptedOutputs () const =0
 The adaptedOutputs that have this current output item as adaptee. More...
 
virtual void addAdaptedOutput (IAdaptedOutput *adaptedOutput)=0
 Add a IAdaptedOutput to this output item. More...
 
virtual bool removeAdaptedOutput (IAdaptedOutput *adaptedOutput)=0
 Removes an IAdaptedOutput. More...
 
virtual void updateValues (IInput *querySpecifier)=0
 Provides the values matching the value definition specified by the

Parameters
querySpecifier

. Extensions can overwrite this base version to include more details in the query, e.g. time and space. More...

 
- Public Member Functions inherited from HydroCouple::IExchangeItem
virtual ~IExchangeItem ()
 
- Public Member Functions inherited from HydroCouple::IComponentDataItem
virtual ~IComponentDataItem ()
 
virtual IModelComponentmodelComponent () const =0
 Gets the owner IModelComponent of this IComponentItem.For an IOutput component item this is the component responsible for providing the content of the IOutput. More...
 
virtual QList< IDimension * > dimensions () const =0
 provides purely descriptive information of the dimensions associated with this IComponentItem More...
 
virtual int dimensionLength (const std::vector< int > &dimensionIndexes) const =0
 dimensionLength returns the length of the dimension specified by the given dimension indexes. To get the size of the first dimension, use a null integer array as input argument. Length of indices must be a least one smaller than the numDimensions() More...
 
virtual IValueDefinitionvalueDefinition () const =0
 IValueDefinition for this IValueSet defines the variable type associated with this object. More...
 
virtual void getValue (const std::vector< int > &dimensionIndexes, void *data) const =0
 Gets a multi-dimensional array of value for given dimension indexes. IndexArray = x + y * InSizeX + z * InSizeX * InSizeY etc;. More...
 
virtual void setValue (const std::vector< int > &dimensionIndexes, const void *data)=0
 Sets a multi-dimensional array of values for given dimension indexes. More...
 
- Public Member Functions inherited from HydroCouple::IIdentity
virtual ~IIdentity ()
 
virtual QString id () const =0
 Gets a unique identifier for the entity. More...
 
- Public Member Functions inherited from HydroCouple::IDescription
virtual ~IDescription ()
 
virtual QString caption () const =0
 Gets caption for the entity. More...
 
virtual void setCaption (const QString &caption)=0
 Sets caption for the entity. More...
 
virtual QString description () const =0
 Gets additional descriptive information for the entity. More...
 
virtual void setDescription (const QString &description)=0
 Gets additional descriptive information for the entity. More...
 
- Public Member Functions inherited from HydroCouple::IPropertyChanged
virtual ~IPropertyChanged ()
 

Additional Inherited Members

- Signals inherited from HydroCouple::IExchangeItem
virtual void itemChanged (const QSharedPointer< IExchangeItemChangeEventArgs > &statusChangedEvent)=0
 The componentItemChanged event is fired when the content of an IComponentItem has changed. More...
 
- Signals inherited from HydroCouple::IPropertyChanged
virtual void propertyChanged (const QString &propertyName)=0
 IPropertyChanged::propertyChanged() is called to emit signal/event when property of child class changes. More...
 

Detailed Description

An output exchange item that can deliver values from an IModelComponent.

If an output does not provide the data in the way a consumer would like to have it the output can be adapted by an IAdaptedOutput, which can transform the data according to the consumer's wishes. E.g. by performing interpolation in time, spatial aggregation, etc.).

Constructor & Destructor Documentation

virtual HydroCouple::IOutput::~IOutput ( )
inlinevirtual

Member Function Documentation

virtual QList<IAdaptedOutput*> HydroCouple::IOutput::adaptedOutputs ( ) const
pure virtual

The adaptedOutputs that have this current output item as adaptee.

As soon as the output item's values have been updated, for each adaptedOutput its IAdaptedOutput.refresh() method must be called.

The list is readonly. Add and remov from the list by using addAdaptedOutput() and removeAdaptedOutput().

virtual void HydroCouple::IOutput::addAdaptedOutput ( IAdaptedOutput adaptedOutput)
pure virtual

Add a IAdaptedOutput to this output item.

Every adaptedOutput that uses data from this output item, needs to add itself as a consumer first.

If a adaptedOutput is added that can not be handled, or that is incompatible with the already added adaptedOutputs, an exception will be thrown

Parameters
adaptedOutputis consumer that has to be added
virtual void HydroCouple::IOutput::addConsumer ( IInput consumer)
pure virtual

Add a consumer to this output item. Every input item that wants to call the IValueSet::getValue() method, needs to add itself as a consumer first.

If a consumer is added that can not be handled, or that is incompatible with the already added consumers, an exception will be thrown.

The addConsumer() method must and will automatically set the consumer's provider (see IInput.provider() )

Parameters
consumerthat has to be added
virtual QList<IInput*> HydroCouple::IOutput::consumers ( ) const
pure virtual

Input items that will consume the values, by calling the GetValues() method.

Every input item that will call this method, needs to call the addConsumer() method first. If the input item is not interested any longer in calling the IValueSet::getValue(), it should remove itself by calling the removeConsumer() method. The list is readonly. Add and remove from the list by using addConsumer() and removeConsumer(). Please be aware that the "unadulterated" values in the output item, provided by the read only Values property, may be called anyway, even if there are no values available.

virtual bool HydroCouple::IOutput::removeAdaptedOutput ( IAdaptedOutput adaptedOutput)
pure virtual

Removes an IAdaptedOutput.

If a adaptedOutput is not interested any longer in this output item data, it should remove itself by calling removeConsumer().

Parameters
adaptedOutputis a consumer that has to be removed.
virtual bool HydroCouple::IOutput::removeConsumer ( IInput consumer)
pure virtual

Remove a consumer.

If an input item is not interested any longer in calling the IValueSet::getValue() method, it should remove itself by calling RemoveConsumer.

Parameters
consumerthat has to be removed
virtual void HydroCouple::IOutput::updateValues ( IInput querySpecifier)
pure virtual

Provides the values matching the value definition specified by the

Parameters
querySpecifier

. Extensions can overwrite this base version to include more details in the query, e.g. time and space.

One might expect to be the querySpecifier to be of the type IInput, because every input item that calls the getValues method needs to add itself as a consumer first.

However, the IExchangeItem suffices to specify what is required. Therefore, to have the flexibility to loosen the "always register as consumer" approach, it is chosen to provide an IExchangeItem as an argument.

Parameters
querySpecifier

The documentation for this class was generated from the following file: