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

The IMultiInput class is an IInput class that has multiple outputs supplying data to it. More...

#include <hydrocouple.h>

Inheritance diagram for HydroCouple::IMultiInput:
Collaboration diagram for HydroCouple::IMultiInput:

Public Member Functions

virtual ~IMultiInput ()=default
 IMultiInput::~IMultiInput is a virtual destructor.
 
virtual std::vector< IIdentity * > providerLabels () const =0
 
virtual bool isRequiredProvider (const IIdentity *providerLabel) const =0
 isRequiredProvider checks if the provider is required by the consumer.
 
virtual std::vector< IOutput * > providers () const =0
 Gets the list of providers supplying data to this multi-input.
 
virtual bool canConsume (IOutput *provider, std::string &message, const IIdentity *providerRoleIdentifier=nullptr) const =0
 canConsume checks if the provider can supply data to this consumer.
 
virtual bool addProvider (IOutput *provider, const IIdentity *providerRoleIdentifier=nullptr)=0
 addProvider adds a provider to the list of providers.
 
virtual bool removeProvider (IOutput *provider)=0
 Removes a provider from the list of providers.
 
- Public Member Functions inherited from HydroCouple::IInput
virtual ~IInput ()=default
 IInput::~IInput is a virtual destructor.
 
virtual IOutputprovider () const =0
 Gets the producer this consumer should get its values from.
 
virtual bool setProvider (IOutput *provider)=0
 Sets the producer this consumer should get its values from.
 
virtual bool canConsume (IOutput *provider, std::string &message) const =0
 Returns true if this IInput can consume this producer.
 
- Public Member Functions inherited from HydroCouple::IExchangeItem
virtual ~IExchangeItem ()=default
 IExchangeItem::~IExchangeItem is a virtual destructor.
 
- 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 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.
 
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

The IMultiInput class is an IInput class that has multiple outputs supplying data to it.

Constructor & Destructor Documentation

◆ ~IMultiInput()

virtual HydroCouple::IMultiInput::~IMultiInput ( )
virtualdefault

IMultiInput::~IMultiInput is a virtual destructor.

Member Function Documentation

◆ addProvider()

virtual bool HydroCouple::IMultiInput::addProvider ( IOutput provider,
const IIdentity providerRoleIdentifier = nullptr 
)
pure virtual

addProvider adds a provider to the list of providers.

Parameters
provideris the IOutput to add to the list of providers.
idis the IIdentity label specifying where to add the provider.

◆ canConsume()

virtual bool HydroCouple::IMultiInput::canConsume ( IOutput provider,
std::string &  message,
const IIdentity providerRoleIdentifier = nullptr 
) const
pure virtual

canConsume checks if the provider can supply data to this consumer.

Parameters
[in]provideris the IOutput that can supply the data to this IInput.
[out]messageis the error message from the canConsume function.
[in]providerRoleIdentifieris the IIdentity label specifying where to add the provider.
Returns
boolean indicating whether the provider can supply data to this consumer.

◆ isRequiredProvider()

virtual bool HydroCouple::IMultiInput::isRequiredProvider ( const IIdentity providerLabel) const
pure virtual

isRequiredProvider checks if the provider is required by the consumer.

Parameters
providerLabelis the IIdentity label specifying where to add the provider.
Returns
boolean indicating whether the provider is required by the consumer.

◆ providerLabels()

virtual std::vector< IIdentity * > HydroCouple::IMultiInput::providerLabels ( ) const
pure virtual
Returns
vector of identifiers for the provides that a required by this consumer if any.

◆ providers()

virtual std::vector< IOutput * > HydroCouple::IMultiInput::providers ( ) const
pure virtual

Gets the list of providers supplying data to this multi-input.

Returns
A vector of IOutput pointers representing the providers.

◆ removeProvider()

virtual bool HydroCouple::IMultiInput::removeProvider ( IOutput provider)
pure virtual

Removes a provider from the list of providers.

Parameters
provideris the IOutput to remove from the list of providers.
Returns
True if the provider was removed successfully, otherwise false.

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