HydroCouple  2.0.0
HydroCouple Interface Definitions
Loading...
Searching...
No Matches
HydroCouple::IIdBasedComponentDataItem Class Referenceabstract

IIdBasedComponentDataItem is an IComponentDataItem whose data is indexed by string identifiers. More...

#include <hydrocouple.h>

Inheritance diagram for HydroCouple::IIdBasedComponentDataItem:
Collaboration diagram for HydroCouple::IIdBasedComponentDataItem:

Public Member Functions

virtual ~IIdBasedComponentDataItem ()=default
 IIdBasedComponentItem::~IIdBasedComponentItem is a virtual destructor.
 
virtual std::vector< std::string > identifiers () const =0
 Gets the identifiers associated with this id-based component data item.
 
virtual IDimensionidentifierDimension () const =0
 idDimensions returns the dimensions of the id based component item.
 
virtual void getValue (hydrocouple_variant &data, int idIndex, std::span< const int >dimensionIndexes={}) const =0
 Gets a multi-dimensional array of values for given id dimension index and size for a hyperslab.
 
virtual void getValues (hydrocouple_variant *data, std::span< const int >idIndexes, std::span< const int >dimensionIndexes={}, std::span< const int >dimensionLengths={}) const =0
 Gets a multi-dimensional array of values for given id dimension index and size for a hyperslab.
 
virtual void getValues (hydrocouple_variant *data, int idIndex, std::span< const int >dimensionIndexes={}, int idIndexLength=1, std::span< const int >dimensionLengths={}) const =0
 Sets a multi-dimensional array of values for given id dimension index and size for a hyperslab.
 
virtual void setValue (const hydrocouple_variant &data, int idIndex, std::span< const int >dimensionIndexes={})=0
 Sets a multi-dimensional array of values for given time dimension index and size for a hyperslab.
 
virtual void setValues (const hydrocouple_variant *data, std::span< const int >idIndexes, std::span< const int >dimensionIndexes={}, std::span< const int >dimensionLengths={})=0
 Sets a multi-dimensional array of values for given id dimension index and size for a hyperslab.
 
virtual void setValues (const hydrocouple_variant *data, int idIndex, std::span< const int >dimensionIndexes={}, int idIndexLength=1, std::span< const int >dimensionLengths={})=0
 Sets a multi-dimensional array of values for given id dimension index and size for a hyperslab.
 
virtual void getValue (hydrocouple_variant &data, std::span< const int >dimensionIndexes) const=0
 Gets a multi-dimensional array of values for given dimension indexes and strides along each dimension. IndexArray = x + y * InSizeX + z * InSizeX * InSizeY etc;.
 
virtual void getValues (hydrocouple_variant *data, std::span< const int >dimensionIndexes, std::span< const int >dimensionLengths={}) const=0
 Gets a multi-dimensional array of values for given dimension indexes and strides along each dimension.
 
virtual void setValue (const hydrocouple_variant &data, std::span< const int >dimensionIndexes)=0
 Sets a multi-dimensional array of values for given dimension indexes.
 
virtual void setValues (const hydrocouple_variant *data, std::span< const int >dimensionIndexes, std::span< const int >dimensionLengths={})=0
 Sets a multi-dimensional array of values for given dimension indexes and strides along each dimension.
 
- Public Member Functions inherited from HydroCouple::IComponentDataItem
virtual ~IComponentDataItem ()=default
 IComponentDataItem::~IComponentDataItem is a virtual destructor.
 
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.
 
virtual std::vector< IDimension * > dimensions () const =0
 provides purely descriptive information of the dimensions associated with this IComponentItem
 
virtual int dimensionLength (std::span< const 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()
 
virtual IValueDefinitionvalueDefinition () const =0
 IValueDefinition for this IComponentDataItem defines the variable type associated with this object.
 
virtual bool hasEditor () const =0
 hasEditor indicates whether this IComponentItem has a UI editor.
 
virtual void showEditor (void *opaqueUIPointer=nullptr)=0
 showEditor shows the editor for this IComponentItem.
 
virtual bool hasViewer () const =0
 hasViewer indicates whether this IComponentItem has a UI viewer.
 
virtual void showViewer (void *opaqueUIPointer=nullptr)=0
 showViewer shows the viewer for this IComponentItem.
 
- Public Member Functions inherited from HydroCouple::IIdentity
virtual ~IIdentity ()=default
 IIdentity::~IIdentity is a virtual destructor.
 
virtual const std::string & id () const =0
 Gets a unique identifier for the entity.
 
- Public Member Functions inherited from HydroCouple::IDescription
virtual ~IDescription ()=default
 IDescription::~IDescription is a virtual destructor.
 
virtual const std::string & caption () const =0
 Gets caption for the entity.
 
virtual void setCaption (const std::string &caption)=0
 Sets caption for the entity.
 
virtual const std::string & description () const =0
 Gets additional descriptive information for the entity.
 
virtual void setDescription (const std::string &description)=0
 Gets additional descriptive information for the entity.
 
- Public Member Functions inherited from HydroCouple::IPropertyChanged
virtual ~IPropertyChanged ()=default
 IPropertyChanged::~IPropertyChanged is a virtual destructor.
 
- Public Member Functions inherited from HydroCouple::ISignal< std::string >
virtual ~ISignal ()=default
 ISignal::~ISignal is a virtual destructor.
 
virtual void connect (const std::shared_ptr< ISlot< Args... > > &slot)=0
 connect is used to connect a slot to the signal.
 
virtual void disconnect (const std::shared_ptr< ISlot< Args... > > &slot)=0
 disconnect is used to disconnect a slot from the signal.
 
virtual void blockSignals (bool block)=0
 blockSignals is used to block signals from being emitted.
 
- Public Member Functions inherited from HydroCouple::ISignal< const std::shared_ptr< IComponentDataItemValueChanged > & >
virtual ~ISignal ()=default
 ISignal::~ISignal is a virtual destructor.
 
virtual void connect (const std::shared_ptr< ISlot< Args... > > &slot)=0
 connect is used to connect a slot to the signal.
 
virtual void disconnect (const std::shared_ptr< ISlot< Args... > > &slot)=0
 disconnect is used to disconnect a slot from the signal.
 
virtual void blockSignals (bool block)=0
 blockSignals is used to block signals from being emitted.
 

Additional Inherited Members

- Protected Member Functions inherited from HydroCouple::ISignal< std::string >
virtual void emit (Args... args)=0
 emit is used to emit the signal.
 
- Protected Member Functions inherited from HydroCouple::ISignal< const std::shared_ptr< IComponentDataItemValueChanged > & >
virtual void emit (Args... args)=0
 emit is used to emit the signal.
 

Detailed Description

IIdBasedComponentDataItem is an IComponentDataItem whose data is indexed by string identifiers.

It provides get/set methods that accept an id index in addition to the standard dimension indexes from IComponentDataItem.

Constructor & Destructor Documentation

◆ ~IIdBasedComponentDataItem()

virtual HydroCouple::IIdBasedComponentDataItem::~IIdBasedComponentDataItem ( )
virtualdefault

IIdBasedComponentItem::~IIdBasedComponentItem is a virtual destructor.

Member Function Documentation

◆ getValue() [1/2]

virtual void HydroCouple::IIdBasedComponentDataItem::getValue ( hydrocouple_variant data,
int  idIndex,
std::span< const int >  dimensionIndexes = {} 
) const
pure virtual

Gets a multi-dimensional array of values for given id dimension index and size for a hyperslab.

Parameters
[out]datais pre-allocated memory where the data will be written.
[in]idIndexis the id dimension index from where to obtain the requested data.
[in]dimensionIndexesindexes to use for the other dimensions to get the data if they exist otherwise an empty vector.

◆ getValue() [2/2]

virtual void HydroCouple::IComponentDataItem::getValue ( hydrocouple_variant data,
std::span< const int >  dimensionIndexes 
) const
virtual

Gets a multi-dimensional array of values for given dimension indexes and strides along each dimension. IndexArray = x + y * InSizeX + z * InSizeX * InSizeY etc;.

Parameters
[out]dataPointer to pre-allocated location where data is to be saved.
[in]dimensionIndexesare the indexes for the data to be obtained.

Implements HydroCouple::IComponentDataItem.

◆ getValues() [1/3]

virtual void HydroCouple::IIdBasedComponentDataItem::getValues ( hydrocouple_variant data,
int  idIndex,
std::span< const int >  dimensionIndexes = {},
int  idIndexLength = 1,
std::span< const int >  dimensionLengths = {} 
) const
pure virtual

Sets a multi-dimensional array of values for given id dimension index and size for a hyperslab.

Parameters
[out]datais the pre-allocated location where data is to be set.
[in]idIndexis the id dimension index where data is to be written.
[in]dimensionIndexesindexes to use for the other dimensions to get the data if they exist. Otherwise an empty vector.
[in]idIndexLengthis the length of the id dimension index.
[in]dimensionLengthsare the lengths of the dimensions for the data to be set. If empty a single value is set, otherwise the length of the vector must be equal to the number of dimensions.

◆ getValues() [2/3]

virtual void HydroCouple::IComponentDataItem::getValues ( hydrocouple_variant data,
std::span< const int >  dimensionIndexes,
std::span< const int >  dimensionLengths = {} 
) const
virtual

Gets a multi-dimensional array of values for given dimension indexes and strides along each dimension.

Parameters
[out]dataPointer to pre-allocated location where data is to be saved.
[in]dimensionIndexesare the indexes for the data to be obtained.
[in]dimensionLengthsare the lengths of the dimensions for the data to be obtained. If empty a single value is returned, otherwise the length of the vector must be equal to the number of dimensions.

Implements HydroCouple::IComponentDataItem.

◆ getValues() [3/3]

virtual void HydroCouple::IIdBasedComponentDataItem::getValues ( hydrocouple_variant data,
std::span< const int >  idIndexes,
std::span< const int >  dimensionIndexes = {},
std::span< const int >  dimensionLengths = {} 
) const
pure virtual

Gets a multi-dimensional array of values for given id dimension index and size for a hyperslab.

Parameters
[out]datais pre-allocated memory where the data will be written.
[in]idIndexesis the id dimension indexes from where to obtain the requested data.
[in]dimensionIndexesindexes to use for the other dimensions to get the data if they exist. Otherwise an empty vector.
[in]dimensionLengthsare the lengths of the dimensions for the data to be obtained. If empty a single value is returned, otherwise the length of the vector must be equal to the number of dimensions.

◆ identifierDimension()

virtual IDimension * HydroCouple::IIdBasedComponentDataItem::identifierDimension ( ) const
pure virtual

idDimensions returns the dimensions of the id based component item.

If additional dimensions are available, the id dimensions must be the first dimensions.

Returns
The id dimension of the id based component item.

◆ identifiers()

virtual std::vector< std::string > HydroCouple::IIdBasedComponentDataItem::identifiers ( ) const
pure virtual

Gets the identifiers associated with this id-based component data item.

Returns
A vector of strings representing the identifiers.

◆ setValue() [1/2]

virtual void HydroCouple::IIdBasedComponentDataItem::setValue ( const hydrocouple_variant data,
int  idIndex,
std::span< const int >  dimensionIndexes = {} 
)
pure virtual

Sets a multi-dimensional array of values for given time dimension index and size for a hyperslab.

Parameters
[in]datais the pre-allocated location where data is to be set.
[in]idIndexis the id dimension index where data is to be written.
[in]dimensionIndexesindexes to use for the other dimensions to get the data if they exist. Otherwise an empty vector.

◆ setValue() [2/2]

virtual void HydroCouple::IComponentDataItem::setValue ( const hydrocouple_variant data,
std::span< const int >  dimensionIndexes 
)
virtual

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

Parameters
[in]datais the pointer to the input data to be set.
[in]dimensionIndexesare the indexes for where data is to be written.

Implements HydroCouple::IComponentDataItem.

◆ setValues() [1/3]

virtual void HydroCouple::IIdBasedComponentDataItem::setValues ( const hydrocouple_variant data,
int  idIndex,
std::span< const int >  dimensionIndexes = {},
int  idIndexLength = 1,
std::span< const int >  dimensionLengths = {} 
)
pure virtual

Sets a multi-dimensional array of values for given id dimension index and size for a hyperslab.

Parameters
datais the pre-allocated location where data is to be set.
idIndexis the id dimension index where data is to be written.
dimensionIndexesindexes to use for the other dimensions to get the data if they exist. Otherwise an empty vector.
idIndexLengthis the length of the id dimension index.
dimensionLengthsare the lengths of the dimensions for the data to be set. If empty a single value is set, otherwise the length of the vector must be equal to the number of dimensions.

◆ setValues() [2/3]

virtual void HydroCouple::IComponentDataItem::setValues ( const hydrocouple_variant data,
std::span< const int >  dimensionIndexes,
std::span< const int >  dimensionLengths = {} 
)
virtual

Sets a multi-dimensional array of values for given dimension indexes and strides along each dimension.

Parameters
[in]datais the pointer to the input data to be set.
[in]dimensionIndexesare the indexes for where data is to be written.
[in]dimensionLengthsare the lengths of the dimensions for the data to be set. If empty a single value is set, otherwise the length of the vector must be equal to the number of dimensions.

Implements HydroCouple::IComponentDataItem.

◆ setValues() [3/3]

virtual void HydroCouple::IIdBasedComponentDataItem::setValues ( const hydrocouple_variant data,
std::span< const int >  idIndexes,
std::span< const int >  dimensionIndexes = {},
std::span< const int >  dimensionLengths = {} 
)
pure virtual

Sets a multi-dimensional array of values for given id dimension index and size for a hyperslab.

Parameters
datais the pre-allocated location where data is to be set.
idIndexesis the id dimension indexes from where to obtain the requested data.
dimensionIndexesindexes to use for the other dimensions to get the data if they exist. Otherwise an empty vector.
dimensionLengthsare the lengths of the dimensions for the data to be set. If empty a single value is set, otherwise the length of the vector must be equal to the number of dimensions.

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