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

IArgument interface class used to set the arguments for components. They can be complex or simple multi-dimensional datasets. More...

#include <hydrocouple.h>

Inheritance diagram for HydroCouple::IArgument:
Collaboration diagram for HydroCouple::IArgument:

Public Types

enum  ArgumentIOType {
  String,
  File
}
 

Public Member Functions

virtual ~IArgument ()
 
virtual bool isOptional () const =0
 Specifies whether the argument is optional or not. More...
 
virtual bool isReadOnly () const =0
 Defines whether the Values property may be edited. More...
 
virtual QString toString () const =0
 String/XML representation for this IArgument. More...
 
virtual void saveData ()=0
 Writes data to files associated with this argument if they exist. More...
 
virtual QStringList fileFilters () const =0
 File type extensions that can be read by this IArgument. More...
 
virtual bool canReadFromFile () const =0
 Boolean indicating whether this IArgument can read its values from a file. More...
 
virtual bool canReadFromString () const =0
 Boolean indicating whether this IArgument copy its values from a QString. More...
 
virtual ArgumentIOType currentArgumentIOType () const =0
 argumentIOType More...
 
virtual bool readValues (const QString &value, QString &message, bool isFile=false)=0
 Reads values from a QString or a QString representing an input file. More...
 
virtual bool readValues (const IComponentDataItem *componentDataItem, QString &message)=0
 Reads values from an equivalent IComponentDataItem. IComponentDataItem has been used instead of IArgument so that outputs from one model can be used as initialization arguments for another. More...
 
- 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::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

IArgument interface class used to set the arguments for components. They can be complex or simple multi-dimensional datasets.

IArgument is primarily used to set arguments of IModelComponent and IAdaptedOutput

Member Enumeration Documentation

Enumerator
String 

Enumeration indicating that the argument was read from QString.

File 

Enumeration indicating that the argument was read from a file.

Constructor & Destructor Documentation

virtual HydroCouple::IArgument::~IArgument ( )
inlinevirtual

Member Function Documentation

virtual bool HydroCouple::IArgument::canReadFromFile ( ) const
pure virtual

Boolean indicating whether this IArgument can read its values from a file.

virtual bool HydroCouple::IArgument::canReadFromString ( ) const
pure virtual

Boolean indicating whether this IArgument copy its values from a QString.

virtual ArgumentIOType HydroCouple::IArgument::currentArgumentIOType ( ) const
pure virtual

argumentIOType

Returns
virtual QStringList HydroCouple::IArgument::fileFilters ( ) const
pure virtual

File type extensions that can be read by this IArgument.

File extensions must be specified using the Qt format e.g. "Images (*.png *.xpm *.jpg) "

Returns
a list of strings for compatible file extensions.
virtual bool HydroCouple::IArgument::isOptional ( ) const
pure virtual

Specifies whether the argument is optional or not.

If the getValue property returns null and isOptional == false, a value has to be set before the argument can be used

virtual bool HydroCouple::IArgument::isReadOnly ( ) const
pure virtual

Defines whether the Values property may be edited.

This is used to let a IModelComponent or an IAdaptedOutput present the actual value of an argument that can not be changed by the user, but is needed to determine the values of other arguments or is informative in any other way.

virtual bool HydroCouple::IArgument::readValues ( const QString &  value,
QString &  message,
bool  isFile = false 
)
pure virtual

Reads values from a QString or a QString representing an input file.

Parameters
valueis QString representing values or file containing values.
messagemessage returned from file read operation.
isFileis a boolean indicating whether the values are in the QString or the file pointed by the QString.
Returns
boolean indicating whether file/string reading was successful
virtual bool HydroCouple::IArgument::readValues ( const IComponentDataItem componentDataItem,
QString &  message 
)
pure virtual

Reads values from an equivalent IComponentDataItem. IComponentDataItem has been used instead of IArgument so that outputs from one model can be used as initialization arguments for another.

Parameters
componentDataItemis the IArgument from which to copy values from.
messagemessage returned from file read operation.
Returns
boolean indicating whether file reading was successful.
virtual void HydroCouple::IArgument::saveData ( )
pure virtual

Writes data to files associated with this argument if they exist.

Returns
virtual QString HydroCouple::IArgument::toString ( ) const
pure virtual

String/XML representation for this IArgument.


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