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

The IProxyModelComponent class is a proxy for a remote IModelComponent that communicates via MPI or another inter-process mechanism. More...

#include <hydrocouple.h>

Inheritance diagram for HydroCouple::IProxyModelComponent:
Collaboration diagram for HydroCouple::IProxyModelComponent:

Public Member Functions

virtual ~IProxyModelComponent ()=default
 ~IProxyModelComponent
 
virtual int parentMpiProcessRank () const =0
 Gets the MPI process rank of the parent model.
 
virtual std::string parentProcessAddress () const =0
 Gets the address of the parent model process.
 
virtual std::string parentId () const =0
 Gets the unique identifier of the parent model.
 
- Public Member Functions inherited from HydroCouple::IModelComponent
virtual ~IModelComponent ()=default
 IModelComponent::~IModelComponent destructor.
 
virtual IModelComponentInfocomponentInfo () const =0
 Contains the metadata about this IModelComponent instance.
 
virtual ComponentStatus status () const =0
 Defines current status of the IModelComponent. See IModelComponent::ComponentStatus for the possible values.
 
virtual std::vector< IArgument * > arguments () const =0
 Arguments needed to let the component do its work. An unmodifiable list of (modifiable) arguments must be returned that is to be used to get information about the arguments and to set argument values.
 
virtual std::vector< IInput * > inputs () const =0
 The list of consumer items for which a component can recieve values.
 
virtual std::vector< IOutput * > outputs () const =0
 The list of IOutputs for which a component can produce results.
 
virtual std::vector< IComponentDataItem * > results () const =0
 List of the model's output results.
 
virtual void initialize ()=0
 Initializes the current IModelComponent.
 
virtual std::vector< std::string > validate ()=0
 Validates the populated instance of the IModelComponent.
 
virtual void prepare ()=0
 Prepares the IModelComponent for calls to the Update method.
 
virtual void update (const std::vector< IOutput * > &requiredOutputs={})=0
 This method is called to let the component update itself, thus reaching its next state.
 
virtual void finish ()=0
 The finish() must be invoked as the last of any methods in the IModelComponent interface.
 
virtual const IWorkflowComponentworkflow () const =0
 Gets the workflow that this component is part of.
 
virtual void setWorkflow (const IWorkflowComponent *workflow)=0
 Sets the workflow that this component is part of.
 
virtual int mpiNumOfProcesses () const =0
 Gets the number of MPI processes allocated to this component.
 
virtual int mpiProcessRank () const =0
 mpiProcess is the MPI process/rank of this component.
 
virtual void mpiSetProcessRank (int processRank)=0
 mpiSetProcess sets the rank for the mpi process associated with this instance of the model.
 
virtual std::set< int > mpiAllocatedProcesses () const =0
 Gets the set of MPI processes/ranks allocated to this component.
 
virtual void mpiAllocateProcesses (const std::set< int > &mpiProcessesToAllocate)=0
 mpiAllocateResources allocates the specified MPI processes/ranks to this component.
 
virtual void mpiClearAllocatedProcesses ()=0
 Clears all MPI processes/ranks allocated to this component.
 
virtual std::string referenceDirectory () const =0
 Gets the reference directory for this component instance.
 
virtual void setReferenceDirectory (const std::string &referenceDirectory)=0
 setReferenceDirectory Sets the reference directory for this component instance.
 
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< IComponentStatusChangeEventArgs > & >
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

- Public Types inherited from HydroCouple::IModelComponent
enum class  ComponentStatus {
  Created ,
  Initializing ,
  Initialized ,
  Validating ,
  Valid ,
  WaitingForData ,
  Invalid ,
  Preparing ,
  Updating ,
  Updated ,
  Done ,
  Finishing ,
  Finished ,
  Failed
}
 HydroCouple::ComponentStatus is an enumerator that describes the status of a component over the course of its lifetime. More...
 
- 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< IComponentStatusChangeEventArgs > & >
virtual void emit (Args... args)=0
 emit is used to emit the signal.
 

Detailed Description

The IProxyModelComponent class is a proxy for a remote IModelComponent that communicates via MPI or another inter-process mechanism.

Constructor & Destructor Documentation

◆ ~IProxyModelComponent()

virtual HydroCouple::IProxyModelComponent::~IProxyModelComponent ( )
virtualdefault

~IProxyModelComponent

Member Function Documentation

◆ parentId()

virtual std::string HydroCouple::IProxyModelComponent::parentId ( ) const
pure virtual

Gets the unique identifier of the parent model.

Returns
A string representing the unique identifier of its parent model.

◆ parentMpiProcessRank()

virtual int HydroCouple::IProxyModelComponent::parentMpiProcessRank ( ) const
pure virtual

Gets the MPI process rank of the parent model.

Returns
An integer representing the MPI process rank of its parent model.

◆ parentProcessAddress()

virtual std::string HydroCouple::IProxyModelComponent::parentProcessAddress ( ) const
pure virtual

Gets the address of the parent model process.

Returns
A string representing the address of its parent model.

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