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

IComponentItem is a fundamental unit of data for a component. More...

#include <hydrocouple.h>

Inheritance diagram for HydroCouple::IComponentDataItem:
Collaboration diagram for HydroCouple::IComponentDataItem:

Public Member Functions

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::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

IComponentItem is a fundamental unit of data for a component.

This interface is not to be implemented directly. Input and output data must be 1D arrays indexed using dim1 + dim2*size1 + dim3*size1*size2 + dim4*size1*size2*size3 + ...

Constructor & Destructor Documentation

virtual HydroCouple::IComponentDataItem::~IComponentDataItem ( )
inlinevirtual

Member Function Documentation

virtual int HydroCouple::IComponentDataItem::dimensionLength ( const std::vector< int > &  dimensionIndexes) const
pure virtual

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()

Parameters
dimensionIndexesarray of indexes of the dimensions to get the length of. Its size must be less than the number of dimensions.
Returns
length of the last dimension corresponding to the dimensionIndexes provided.
virtual QList<IDimension*> HydroCouple::IComponentDataItem::dimensions ( ) const
pure virtual

provides purely descriptive information of the dimensions associated with this IComponentItem

Returns
A list of IDimension objects.
virtual void HydroCouple::IComponentDataItem::getValue ( const std::vector< int > &  dimensionIndexes,
void *  data 
) const
pure virtual

Gets a multi-dimensional array of value for given dimension indexes. IndexArray = x + y * InSizeX + z * InSizeX * InSizeY etc;.

Parameters
dimensionIndexesare the indexes for the data to be obtained.
dataPointer to pre-allocated location where data is to be saved.
virtual IModelComponent* HydroCouple::IComponentDataItem::modelComponent ( ) const
pure virtual

Gets the owner IModelComponent of this IComponentItem.For an IOutput component item this is the component responsible for providing the content of the IOutput.

It is possible for an IComponentItem to have no owner, in this case the method will return nullptr.

Returns
an IModelComponent object that is the parent of this IComponentItem
virtual void HydroCouple::IComponentDataItem::setValue ( const std::vector< int > &  dimensionIndexes,
const void *  data 
)
pure virtual

Sets a multi-dimensional array of values for given dimension indexes.

Parameters
dimensionIndexesare the indexes for where data is to be written.
datais the pointer to the input data to be set.
virtual IValueDefinition* HydroCouple::IComponentDataItem::valueDefinition ( ) const
pure virtual

IValueDefinition for this IValueSet defines the variable type associated with this object.

Returns
the variable definition for this variable. This is either a

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