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

IWorkflowComponent manages the execution workflow for a set of coupled IModelComponent instances. More...

#include <hydrocouple.h>

Inheritance diagram for HydroCouple::IWorkflowComponent:
Collaboration diagram for HydroCouple::IWorkflowComponent:

Public Types

enum class  WorkflowStatus {
  Created ,
  Initializing ,
  Initialized ,
  Updating ,
  Updated ,
  Done ,
  Finishing ,
  Finished ,
  Failed
}
 The WorkflowStatus enum describes the status of a workflow component over the course of its lifetime. More...
 

Public Member Functions

virtual ~IWorkflowComponent ()=default
 ~IWorkflowComponent destructor for IWorkflowComponent class.
 
virtual IWorkflowComponentInfocomponentInfo () const =0
 Gets the metadata information about this workflow component.
 
virtual std::vector< IIdentity * > modelComponentLabels () const =0
 requiredModelComponentIdentifiers returns the vector of IModelComponent identifiers that are required by this component.
 
virtual bool isRequiredModelComponent (const IIdentity *modelComponentLabel) const =0
 isRequiredModelComponent checks if the model component is required by this component.
 
virtual void initialize ()=0
 Initializes the workflow component.
 
virtual void update ()=0
 Updates the workflow component for the current time step.
 
virtual void finish ()=0
 Finalizes the workflow component and releases resources.
 
virtual WorkflowStatus status () const =0
 Gets the current status of the workflow component.
 
virtual std::vector< IModelComponent * > modelComponents () const =0
 Gets the model components managed by this workflow.
 
virtual bool addModelComponent (IModelComponent *component, const IIdentity *modelRoleIdentifier=nullptr)=0
 addModelComponent Adds model component instance to workflow
 
virtual bool removeModelComponent (IModelComponent *component)=0
 removeModelComponent Removes model component instance from workflow
 
- 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< IWorkflowComponentStatusChangeEventArgs > & >
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< IWorkflowComponentStatusChangeEventArgs > & >
virtual void emit (Args... args)=0
 emit is used to emit the signal.
 

Detailed Description

IWorkflowComponent manages the execution workflow for a set of coupled IModelComponent instances.

A workflow component orchestrates the initialization, execution, and finalization of multiple model components that form a coupled simulation.

Member Enumeration Documentation

◆ WorkflowStatus

The WorkflowStatus enum describes the status of a workflow component over the course of its lifetime.

Enumerator
Created 

The workflow component has just been created.

Initializing 

The workflow component is initializing itself.

Initialized 

The workflow component has successfully initialized.

Updating 

The workflow component is performing an update step.

Updated 

The workflow component has successfully updated.

Done 

The workflow component has completed all update steps.

Finishing 

The workflow component is finalizing and releasing resources.

Finished 

The workflow component has finished and cannot be restarted.

Failed 

The workflow component encountered an error.

Constructor & Destructor Documentation

◆ ~IWorkflowComponent()

virtual HydroCouple::IWorkflowComponent::~IWorkflowComponent ( )
virtualdefault

~IWorkflowComponent destructor for IWorkflowComponent class.

Member Function Documentation

◆ addModelComponent()

virtual bool HydroCouple::IWorkflowComponent::addModelComponent ( IModelComponent component,
const IIdentity modelRoleIdentifier = nullptr 
)
pure virtual

addModelComponent Adds model component instance to workflow

Parameters
componentis the IModelComponent to add to the workflow.
modelRoleIdentifieris the IIdentity of the role of the model component. If null, the component is added as a standalone component. in which case the workflow likely does not require ordered or specific components for its operation.
Returns
True if the component was added successfully, otherwise false.

◆ componentInfo()

virtual IWorkflowComponentInfo * HydroCouple::IWorkflowComponent::componentInfo ( ) const
pure virtual

Gets the metadata information about this workflow component.

Returns
A pointer to the IWorkflowComponentInfo for this component.

◆ finish()

virtual void HydroCouple::IWorkflowComponent::finish ( )
pure virtual

Finalizes the workflow component and releases resources.

◆ initialize()

virtual void HydroCouple::IWorkflowComponent::initialize ( )
pure virtual

Initializes the workflow component.

◆ isRequiredModelComponent()

virtual bool HydroCouple::IWorkflowComponent::isRequiredModelComponent ( const IIdentity modelComponentLabel) const
pure virtual

isRequiredModelComponent checks if the model component is required by this component.

Parameters
modelComponentLabelis the IIdentity label specifying the model component.
Returns
boolean indicating whether the model component is required by this component.

◆ modelComponentLabels()

virtual std::vector< IIdentity * > HydroCouple::IWorkflowComponent::modelComponentLabels ( ) const
pure virtual

requiredModelComponentIdentifiers returns the vector of IModelComponent identifiers that are required by this component.

Returns
A vector of IModelComponent identifiers that are required by this component.

◆ modelComponents()

virtual std::vector< IModelComponent * > HydroCouple::IWorkflowComponent::modelComponents ( ) const
pure virtual

Gets the model components managed by this workflow.

Returns
A vector of IModelComponent pointers managed by this workflow.

◆ removeModelComponent()

virtual bool HydroCouple::IWorkflowComponent::removeModelComponent ( IModelComponent component)
pure virtual

removeModelComponent Removes model component instance from workflow

Parameters
componentis the IModelComponent to remove from the workflow.
Returns
True if the component was removed successfully, otherwise false.

◆ status()

virtual WorkflowStatus HydroCouple::IWorkflowComponent::status ( ) const
pure virtual

Gets the current status of the workflow component.

Returns
The current WorkflowStatus of this component.

◆ update()

virtual void HydroCouple::IWorkflowComponent::update ( )
pure virtual

Updates the workflow component for the current time step.


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