36#include <unordered_map>
66 template <
typename... Args>
116 if (lhs.index() != rhs.index())
117 return lhs.index() < rhs.index();
118 return std::visit([&rhs](
const auto &a) ->
bool
120 using T = std::decay_t<
decltype(a)>;
121 if constexpr (std::is_same_v<T, std::monostate> || std::is_same_v<T, std::any>)
124 return a < std::get<T>(rhs); }, lhs);
139 template <
typename... Args>
162 template <
typename... Args>
194 virtual void emit(Args... args) = 0;
232 [[nodiscard]]
virtual const std::string &
caption()
const = 0;
278 [[nodiscard]]
virtual const std::string &
id()
const = 0;
324 [[nodiscard]]
virtual std::string
developer()
const = 0;
336 [[nodiscard]]
virtual std::string
license()
const = 0;
342 [[nodiscard]]
virtual std::string
copyright()
const = 0;
348 [[nodiscard]]
virtual std::string
url()
const = 0;
354 [[nodiscard]]
virtual std::string
email()
const = 0;
360 [[nodiscard]]
virtual std::string
version()
const = 0;
367 [[nodiscard]]
virtual std::set<std::string>
tags()
const = 0;
376 [[nodiscard]]
virtual bool validateLicense(
const std::string &licenseInfo, std::string &validationMessage) = 0;
578 [[nodiscard]]
virtual std::vector<IArgument *>
arguments()
const = 0;
594 [[nodiscard]]
virtual std::vector<IInput *>
inputs()
const = 0;
615 [[nodiscard]]
virtual std::vector<IOutput *>
outputs()
const = 0;
621 [[nodiscard]]
virtual std::vector<IComponentDataItem *>
results()
const = 0;
672 [[nodiscard]]
virtual std::vector<std::string>
validate() = 0;
721 virtual void update(
const std::vector<IOutput *> &requiredOutputs = {}) = 0;
814 virtual void showEditor(
void *opaqueUIPointer =
nullptr) = 0;
826 virtual void showViewer(
void *opaqueUIPointer =
nullptr) = 0;
858 [[nodiscard]]
virtual std::string
parentId()
const = 0;
896 [[nodiscard]]
virtual std::string
message()
const = 0;
937 [[nodiscard]]
virtual ICloneableModelComponent *
clone(
const std::unordered_map<std::string, hydrocouple_variant> &clone_optional_arguments = std::unordered_map<std::string, hydrocouple_variant>()) = 0;
943 [[nodiscard]]
virtual std::vector<ICloneableModelComponent *>
clones()
const = 0;
968 [[nodiscard]]
virtual const std::type_info &
type()
const = 0;
1371 [[nodiscard]]
virtual std::vector<IDimension *>
dimensions()
const = 0;
1382 [[nodiscard]]
virtual int dimensionLength(std::span<const int>dimensionIndexes = {})
const = 0;
1398 std::span<const int>dimensionIndexes)
const = 0;
1409 std::span<const int>dimensionIndexes,
1410 std::span<const int>dimensionLengths = {})
const = 0;
1419 std::span<const int>dimensionIndexes) = 0;
1430 std::span<const int>dimensionIndexes,
1431 std::span<const int>dimensionLengths = {}) = 0;
1559 [[nodiscard]]
virtual std::string
toString()
const = 0;
1571 [[nodiscard]]
virtual std::vector<std::string>
fileFilters()
const = 0;
1635 [[nodiscard]]
virtual std::string
message()
const = 0;
1680 [[nodiscard]]
virtual std::vector<IInput *>
consumers()
const = 0;
1798 [[nodiscard]]
virtual std::vector<IArgument *>
arguments()
const = 0;
1980 [[nodiscard]]
virtual std::vector<IOutput *>
providers()
const = 0;
2030 [[nodiscard]]
virtual std::vector<std::string>
identifiers()
const = 0;
2049 std::span<const int>dimensionIndexes = {})
const = 0;
2061 std::span<const int>idIndexes,
2062 std::span<const int>dimensionIndexes = {},
2063 std::span<const int>dimensionLengths = {})
const = 0;
2077 std::span<const int>dimensionIndexes = {},
2078 int idIndexLength = 1,
2079 std::span<const int>dimensionLengths = {})
const = 0;
2091 std::span<const int>dimensionIndexes = {}) = 0;
2104 std::span<const int>idIndexes,
2105 std::span<const int>dimensionIndexes = {},
2106 std::span<const int>dimensionLengths = {}) = 0;
2120 std::span<const int>dimensionIndexes = {},
2121 int idIndexLength = 1,
2122 std::span<const int>dimensionLengths = {}) = 0;
2283 [[nodiscard]]
virtual std::string
message()
const = 0;
IAdaptedOutputFactoryComponent is an IAdaptedOutputFactory generated from an IAdaptedOutputFactoryCom...
Definition hydrocouple.h:1906
virtual ~IAdaptedOutputFactoryComponent()=default
IAdaptedOutputFactoryComponent::~IAdaptedOutputFactoryComponent is a virtual destructor.
virtual IAdaptedOutputFactoryComponentInfo * componentInfo() const =0
Contains the metadata about this IAdaptedOutputFactoryComponent.
IAdaptedOutputFactoryComponentInfo interface class provides information about an IAdaptedOutputFactor...
Definition hydrocouple.h:1887
virtual ~IAdaptedOutputFactoryComponentInfo()=default
IAdaptedOutputFactoryComponentInfo::~IAdaptedOutputFactoryComponentInfo is a virtual destructor.
virtual IAdaptedOutputFactoryComponent * createComponentInstance()=0
New IAdaptedOutputFactoryComponent instance.
IAdaptedOutputFactory is used to create instances of IAdaptedOutput.
Definition hydrocouple.h:1844
virtual std::unique_ptr< IAdaptedOutput > createAdaptedOutput(IIdentity *adaptedProviderId, IOutput *provider, IInput *consumer=nullptr)=0
Creates a IAdaptedOutput that adapts the producer so that it fits the consumer.
virtual ~IAdaptedOutputFactory()=default
IAdaptedOutputFactory::~IAdaptedOutputFactory is a virtual destructor.
virtual std::vector< IIdentity * > getAvailableAdaptedOutputIds(const IOutput *provider, const IInput *consumer=nullptr)=0
Get a vector of IIdentity objects representing the vector of IAdaptedOutput instances that can be cre...
An IAdaptedOutput adds one or more data operations on top of an IOutput.
Definition hydrocouple.h:1774
virtual IOutput * adaptee() const =0
IOutput that this IAdaptedOutput extracts content from. In the adapter design pattern,...
virtual IAdaptedOutputFactory * adaptedOutputFactory() const =0
IAdaptedOutputFactory that generated this IAdaptedOutput.
virtual ~IAdaptedOutput()=default
IAdaptedOutput::~IAdaptedOutput is a virtual destructor.
virtual void initialize()=0
Lets this IAdaptedOutput initialize() itself, based on the current values specified by the arguments.
virtual void refresh()=0
Requests the IAdaptedOutput to refresh itself and perform any necessary calculations.
virtual std::vector< IArgument * > arguments() const =0
IArgument represents input parameters needed for this IAdaptedOutput.
IArgument interface class used to set the arguments for components. They can be complex or simple mul...
Definition hydrocouple.h:1495
virtual bool isValidArgType(ArgumentInputType argType) const =0
Boolean indicating whether this IArgument copy its values from a string.
virtual void saveData()=0
Writes data to files associated with this argument if they exist.
virtual ArgumentInputType currentArgumentInputType() const =0
Gets the current input type used for this argument.
virtual bool isReadOnly() const =0
Defines whether the Values property may be edited.
virtual std::vector< const std::type_info * > validComponentDataItemTypes() const =0
Gets the valid IComponentDataItem instance types that can be read by this argument.
ArgumentInputType
Enumeration indicating the type of input for the argument.
Definition hydrocouple.h:1502
@ File
Enumeration indicating that the argument was read from a file.
@ JSON
Enumeration indicating that the argument input is in JSON format.
@ String
Enumeration indicating that the argument was read from string.
@ XML
Enumeration indicating that the argument was read from a file.
@ URL
Enumeration indicating that the argument was read from a URL.
@ MEMORY_OBJECT
Enumeration indicating that the argument was read from a memory object.
virtual bool initialize(const std::string &value, ArgumentInputType argType, std::string &message)=0
Reads values from a JSON string.
virtual std::vector< std::string > fileFilters() const =0
File type extensions that can be read by this IArgument.
virtual bool initialize(const IComponentDataItem &componentDataItem, std::string &message)=0
Reads values from an equivalent IComponentDataItem. IComponentDataItem has been used instead of IArgu...
virtual ~IArgument()=default
IArgument::~IArgument is a virtual destructor.
virtual std::string toString() const =0
String/XML representation for this IArgument.
virtual bool isOptional() const =0
Specifies whether the argument is optional or not.
The ICloneableModelComponent class is an IModelComponent that supports deep cloning of itself and its...
Definition hydrocouple.h:916
virtual std::vector< ICloneableModelComponent * > clones() const =0
A vector ICloneableModelComponent instances cloned from this IModelComponent instance.
virtual ICloneableModelComponent * parent() const =0
Parent ICloneableModelComponent object from which current component was cloned from.
virtual ICloneableModelComponent * clone(const std::unordered_map< std::string, hydrocouple_variant > &clone_optional_arguments=std::unordered_map< std::string, hydrocouple_variant >())=0
Deep clones itself including cloning its IArgument instances.
virtual ~ICloneableModelComponent()=default
~ICloneableModelComponent destructor
IComponentDataItem is a fundamental unit of data for a component.
Definition hydrocouple.h:1347
virtual bool hasViewer() const =0
hasViewer indicates whether this IComponentItem has a UI viewer.
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 void showViewer(void *opaqueUIPointer=nullptr)=0
showViewer shows the viewer for this IComponentItem.
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...
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 IModelComponent * modelComponent() const =0
Gets the owner IModelComponent of this IComponentItem. For an IOutput component item this is the comp...
virtual void showEditor(void *opaqueUIPointer=nullptr)=0
showEditor shows the editor for this IComponentItem.
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 std::vector< IDimension * > dimensions() const =0
provides purely descriptive information of the dimensions associated with this IComponentItem
virtual bool hasEditor() const =0
hasEditor indicates whether this IComponentItem has a UI editor.
virtual ~IComponentDataItem()=default
IComponentDataItem::~IComponentDataItem is a virtual destructor.
virtual int dimensionLength(std::span< const int >dimensionIndexes={}) const =0
dimensionLength returns the length of the dimension specified by the given dimension indexes....
virtual IValueDefinition * valueDefinition() const =0
IValueDefinition for this IComponentDataItem defines the variable type associated with this object.
IComponentDataItemValueChanged interface class used to notify when the values of a IComponentDataItem...
Definition hydrocouple.h:1462
virtual ~IComponentDataItemValueChanged()=default
IComponentDataItemValueChanged::~IComponentDataItemValueChanged is a virtual destructor.
virtual std::vector< int > dimensionIndexes() const =0
Gets the dimension indexes of the data that changed.
virtual IComponentDataItem * componentDataItem() const =0
Gets the IComponentDataItem that fired the event.
virtual std::vector< int > dimensionLengths() const =0
Gets the strides of the data that changed.
IComponentInfo interface class is a factory that provides detailed metadata about a component and cre...
Definition hydrocouple.h:290
virtual std::string license() const =0
Component license info.
virtual std::string email() const =0
Component developer email.
virtual std::string developer() const =0
Component developer information.
virtual std::string url() const =0
Component developer url.
virtual std::string copyright() const =0
Component copyright info.
virtual std::vector< std::string > documentation() const =0
Documentation associated with this component.
virtual std::string iconFilePath() const =0
File path to Component icon. Must be specified relative to the component library.
virtual std::set< std::string > tags() const =0
tags used to classify this component.
virtual ~IComponentInfo()=default
IComponentInfo::~IComponentInfo is a virtual destructor.
virtual void setLibraryFilePath(const std::string &filePath)=0
Sets file path to Component library.
virtual bool validateLicense(std::string &validationMessage)=0
validateLicense Checks if component is licensed and returns.
virtual bool validateLicense(const std::string &licenseInfo, std::string &validationMessage)=0
Checks if license is valid and persists license information.
virtual std::string libraryFilePath() const =0
File path to Component library.
virtual std::string version() const =0
Component version info.
The IComponentStatusChangeEventArgs contains the information that will be passed when the IModelCompo...
Definition hydrocouple.h:867
virtual IModelComponent * component() const =0
Gets the IModelComponent that fired the event.
virtual IModelComponent::ComponentStatus status() const =0
Gets the IModelComponent's status after the status change.
virtual float percentProgress() const =0
Number between 0 and 100 indicating the progress made by a component in its simulation.
virtual std::string message() const =0
Gets additional information about the status change.
virtual IModelComponent::ComponentStatus previousStatus() const =0
Gets the IModelComponent's status before the status change.
virtual ~IComponentStatusChangeEventArgs()=default
~IComponentStatusChangeEventArgs destructor
virtual bool hasProgressMonitor() const =0
Indicates whether this event has a progress monitor.
IDescription interface class provides descriptive information on a HydroCouple object.
Definition hydrocouple.h:219
virtual void setCaption(const std::string &caption)=0
Sets caption for the entity.
virtual ~IDescription()=default
IDescription::~IDescription is a virtual destructor.
virtual const std::string & caption() const =0
Gets caption for the entity.
virtual void setDescription(const std::string &description)=0
Gets additional descriptive information for the entity.
virtual const std::string & description() const =0
Gets additional descriptive information for the entity.
IDimension provides the properties of the dimensions of a variable.
Definition hydrocouple.h:981
virtual ~IDimension()=default
~IDimension destructor
LengthType
IDimension::LengthType dimension length type.
Definition hydrocouple.h:987
@ Static
Static length type.
@ Dynamic
Dynamic length type.
virtual LengthType lengthType() const =0
Gets the length type of the dimension.
The IExchangeItemChangeEventArgs contains the information that will be passed when the IComponentItem...
Definition hydrocouple.h:1620
virtual ~IExchangeItemChangeEventArgs()=default
Standard destructor.
virtual IExchangeItem * exchangeItem() const =0
IExchangeItem which fired the signal.
virtual std::string message() const =0
Gets message associated with the event.
IExchangeItem the base data item the can be exchanged between components at runtime.
Definition hydrocouple.h:1644
virtual ~IExchangeItem()=default
IExchangeItem::~IExchangeItem is a virtual destructor.
IIdBasedComponentDataItem is an IComponentDataItem whose data is indexed by string identifiers.
Definition hydrocouple.h:2013
virtual std::vector< std::string > identifiers() const =0
Gets the identifiers associated with this id-based component data item.
virtual ~IIdBasedComponentDataItem()=default
IIdBasedComponentItem::~IIdBasedComponentItem is a virtual destructor.
virtual IDimension * identifierDimension() const =0
idDimensions returns the dimensions of the id based component item.
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 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 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 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 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 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.
IIdentity interface class defines a method to get the Id of an HydroCouple entity.
Definition hydrocouple.h:261
virtual ~IIdentity()=default
IIdentity::~IIdentity is a virtual destructor.
virtual const std::string & id() const =0
Gets a unique identifier for the entity.
IModelComponent interface is the core interface in the HydroCouple standard defining a model componen...
Definition hydrocouple.h:425
virtual void setWorkflow(const IWorkflowComponent *workflow)=0
Sets the workflow that this component is part of.
virtual bool hasEditor() const =0
hasEditor indicates whether this IComponentItem has a UI editor.
virtual void finish()=0
The finish() must be invoked as the last of any methods in the IModelComponent interface.
virtual std::vector< IComponentDataItem * > results() const =0
List of the model's output results.
virtual std::set< int > mpiAllocatedProcesses() const =0
Gets the set of MPI processes/ranks allocated to this component.
virtual void initialize()=0
Initializes the current IModelComponent.
virtual void showViewer(void *opaqueUIPointer=nullptr)=0
showViewer shows the viewer for this IComponentItem.
virtual std::string referenceDirectory() const =0
Gets the reference directory for this component instance.
virtual IModelComponentInfo * componentInfo() const =0
Contains the metadata about this IModelComponent instance.
virtual bool hasViewer() const =0
hasViewer indicates whether this IComponentItem has a UI viewer.
virtual void setReferenceDirectory(const std::string &referenceDirectory)=0
setReferenceDirectory Sets the reference directory for this component instance.
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 int mpiProcessRank() const =0
mpiProcess is the MPI process/rank of this component.
virtual void prepare()=0
Prepares the IModelComponent for calls to the Update method.
virtual std::vector< IArgument * > arguments() const =0
Arguments needed to let the component do its work. An unmodifiable list of (modifiable) arguments mus...
virtual int mpiNumOfProcesses() const =0
Gets the number of MPI processes allocated to this component.
virtual void showEditor(void *opaqueUIPointer=nullptr)=0
showEditor shows the editor for this IComponentItem.
virtual void mpiClearAllocatedProcesses()=0
Clears all MPI processes/ranks allocated to this component.
virtual std::vector< std::string > validate()=0
Validates the populated instance of the IModelComponent.
virtual const IWorkflowComponent * workflow() const =0
Gets the workflow that this component is part of.
ComponentStatus
HydroCouple::ComponentStatus is an enumerator that describes the status of a component over the cours...
Definition hydrocouple.h:433
@ Created
The IModelComponent instance has just been created. This status must and will be followed by HydroCou...
@ Finishing
The IModelComponent was requested to perform the actions to be performed before it will either be dis...
@ WaitingForData
The IModelComponent wants to update itself, but is not yet able to perform the actual computation,...
@ Initializing
The IModelComponent is initializing itself. This status will end in a status change to HydroCouple::I...
@ Valid
The IModelComponent is in a HydroCouple::Valid state. When updating itself its required input will be...
@ Invalid
The IModelComponent is in an HydroCouple::Invalid state. When updating itself not all required input ...
@ Initialized
The IModelComponent has successfully initialized itself by calling IModelComponent::initialize()....
@ Updating
The IModelComponent is updating itself. It has received all required input data from other components...
@ Finished
The IModelComponent has successfully performed its finalization actions. Re-initialization of the IMo...
@ Preparing
The IModelComponent is preparing itself for the first IComponentDataItem::getValue() call....
@ Validating
After links between an IModelComponent's inputs/outputs and those of other components have been estab...
@ Failed
The IModelComponent was requested to perform the actions to be perform before it will either be dispo...
@ Done
The last update process that the IModelComponent performed was the final one. A next call to the IMod...
@ Updated
The IModelComponent has successfully updated itself.
virtual ComponentStatus status() const =0
Defines current status of the IModelComponent. See IModelComponent::ComponentStatus for the possible ...
virtual void mpiSetProcessRank(int processRank)=0
mpiSetProcess sets the rank for the mpi process associated with this instance of the model.
virtual ~IModelComponent()=default
IModelComponent::~IModelComponent destructor.
virtual std::vector< IInput * > inputs() const =0
The list of consumer items for which a component can recieve values.
virtual void mpiAllocateProcesses(const std::set< int > &mpiProcessesToAllocate)=0
mpiAllocateResources allocates the specified MPI processes/ranks to this component.
virtual std::vector< IOutput * > outputs() const =0
The list of IOutputs for which a component can produce results.
IModelComponentInfo interface inherits from the IComponentInfo interface which provides detailed meta...
Definition hydrocouple.h:394
virtual ~IModelComponentInfo()=default
IModelComponentInfo::~IModelComponentInfo is a virtual destructor.
virtual std::unique_ptr< IModelComponent > createComponentInstance()=0
Creates a new IModelComponent instance.
virtual std::vector< IAdaptedOutputFactory * > adaptedOutputFactories() const =0
Gets a list of IAdaptedOutputFactories, each allowing to create IAdaptedOutput item for making output...
An output exchange item that can deliver values from an IModelComponent.
Definition hydrocouple.h:1662
virtual ~IOutput()=default
IOutput::~IOutput is a virtual destructor.
virtual void updateValues(const IInput *querySpecifier)=0
Provides the values matching the value definition specified by the querySpecifier....
virtual std::vector< IInput * > consumers() const =0
Input items that will consume the values by calling the IOutput::updateValues() method.
virtual bool removeConsumer(IInput *consumer)=0
Remove a consumer.
virtual bool removeAdaptedOutput(IAdaptedOutput *adaptedOutput)=0
Removes an IAdaptedOutput.
virtual void addConsumer(IInput *consumer)=0
Add a consumer to this output item. Every input item that wants to call the IOutput::updateValues() m...
virtual std::vector< IAdaptedOutput * > adaptedOutputs() const =0
The adaptedOutputs that have this current output item as adaptee.
virtual void addAdaptedOutput(IAdaptedOutput *adaptedOutput)=0
Add a IAdaptedOutput to this output item.
IPropertyChanged interface is used to emit signal/event when a property of an object changes.
Definition hydrocouple.h:202
virtual ~IPropertyChanged()=default
IPropertyChanged::~IPropertyChanged is a virtual destructor.
The IProxyModelComponent class is a proxy for a remote IModelComponent that communicates via MPI or a...
Definition hydrocouple.h:834
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.
virtual ~IProxyModelComponent()=default
~IProxyModelComponent
IQuality describes qualitative data, where a value is specified as one category within a number of pr...
Definition hydrocouple.h:1027
virtual bool isOrdered() const =0
Checks if the IQuality is defined by an ordered set of ICategory or not.
virtual hydrocouple_variant_set categories() const =0
virtual ~IQuality()=default
IQuality::~IQuality is a virtual destructor.
IQuantity specifies values as an amount of some unit, usually as a floating point number.
Definition hydrocouple.h:1313
virtual hydrocouple_variant maxValue() const =0
Gets the maximum allowed value for this quantity.
virtual ~IQuantity()=default
IQuantity::~IQuantity is a virtual destructor.
virtual hydrocouple_variant minValue() const =0
Gets the minimum allowed value for this quantity.
virtual IUnit * unit() const =0
Unit of quantity.
Forward declarations.
Definition hydrocouple.h:164
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.
virtual ~ISignal()=default
ISignal::~ISignal is a virtual destructor.
virtual void emit(Args... args)=0
emit is used to emit the signal.
ISlot interface class must be implemented by classes that want to listen to signals.
Definition hydrocouple.h:141
virtual void operator()(const ISignal< Args... > &sender, Args... args)=0
operator() is the function call operator that is called when a signal is emitted.
virtual ~ISlot()=default
ISlot::~ISlot is a virtual destructor.
Defines the order of dimension in each FundamentalDimension for a unit.
Definition hydrocouple.h:1051
virtual double power(HydroCouple::IUnitDimensions::FundamentalUnitDimension dimension)=0
Returns the power for the requested dimension.
virtual ~IUnitDimensions()=default
IUnitDimensions::~IUnitDimensions is a virtual destructor.
FundamentalUnitDimension
HydroCouple::FundamentalUnitDimension are the fundamental units that can be combined to form all type...
Definition hydrocouple.h:1057
@ Currency
Fundamental dimension for currency.
@ Unitless
Fundamental dimension for unitless quantities.
@ ElectricCurrent
Fundamental dimension for electric current.
@ Time
Fundamental dimension for time.
@ Length
Fundamental dimension for length.
@ AmountOfSubstance
Fundamental dimension for amount of substance.
@ LuminousIntensity
Fundamental dimension for luminous intensity.
@ Temperature
Fundamental dimension for temperature.
@ Mass
Fundamental dimension for mass.
IUnit interface, describing the physical unit of a IQuantity.
Definition hydrocouple.h:1141
DistanceUnits
HydroCouple::DistanceUnits are the types of units that can be used to measure distance.
Definition hydrocouple.h:1157
@ Centimeters
Centimeters.
@ Millimeters
Millimeters.
@ NauticalMiles
NauticalMiles.
virtual double offsetToSI() const =0
OffSet to SI ('B' in: SI-value = A * quant-value + B).
virtual IUnitDimensions * dimensions() const =0
Fundamental dimensions of the unit.
virtual double conversionFactorToSI() const =0
Conversion factor to SI ('A' in: SI-value = A * quant-value + B)
AreaUnits
HydroCouple::AreaUnits are the types of units that can be used to measure area.
Definition hydrocouple.h:1219
@ SquareCentimeters
Square Centimeters.
@ SquareInches
Square Inches.
@ SquareNauticalMiles
Square Nautical Miles.
@ SquareMillimeters
Square Millimeters.
@ SquareYards
Square Yards.
@ SquareKilometers
SquareKilometers.
@ SquareMeters
SquareMeters.
@ SquareDegrees
Square Degrees.
@ SquareMiles
Square Miles.
virtual ~IUnit()=default
IUnit::~IUnit is a virtual destructor.
DistanceUnitType
HydroCouple::DistanceUnitType are the types of units that can be used to measure distance.
Definition hydrocouple.h:1147
IValueDefinition describes the type and properties of values returned by IComponentDataItem::getValue...
Definition hydrocouple.h:955
virtual hydrocouple_variant missingValue() const =0
The value representing that data is missing.
virtual hydrocouple_variant defaultValue() const =0
Gets the default value of the argument.
virtual const std::type_info & type() const =0
Gets the object types of value that will be available and is returned by the GetValues function.
virtual ~IValueDefinition()=default
~IValueDefinition destructor
IWorkflowComponent manages the execution workflow for a set of coupled IModelComponent instances.
Definition hydrocouple.h:2152
virtual ~IWorkflowComponent()=default
~IWorkflowComponent destructor for IWorkflowComponent class.
virtual bool addModelComponent(IModelComponent *component, const IIdentity *modelRoleIdentifier=nullptr)=0
addModelComponent Adds model component instance to workflow
virtual std::vector< IModelComponent * > modelComponents() const =0
Gets the model components managed by this workflow.
virtual void update()=0
Updates the workflow component for the current time step.
virtual WorkflowStatus status() const =0
Gets the current status of the workflow component.
virtual std::vector< IIdentity * > modelComponentLabels() const =0
requiredModelComponentIdentifiers returns the vector of IModelComponent identifiers that are required...
virtual void initialize()=0
Initializes the workflow component.
virtual IWorkflowComponentInfo * componentInfo() const =0
Gets the metadata information about this workflow component.
virtual bool removeModelComponent(IModelComponent *component)=0
removeModelComponent Removes model component instance from workflow
WorkflowStatus
The WorkflowStatus enum describes the status of a workflow component over the course of its lifetime.
Definition hydrocouple.h:2160
@ Created
The workflow component has just been created.
@ Finishing
The workflow component is finalizing and releasing resources.
@ Initializing
The workflow component is initializing itself.
@ Initialized
The workflow component has successfully initialized.
@ Updating
The workflow component is performing an update step.
@ Finished
The workflow component has finished and cannot be restarted.
@ Failed
The workflow component encountered an error.
@ Done
The workflow component has completed all update steps.
@ Updated
The workflow component has successfully updated.
virtual void finish()=0
Finalizes the workflow component and releases resources.
virtual bool isRequiredModelComponent(const IIdentity *modelComponentLabel) const =0
isRequiredModelComponent checks if the model component is required by this component.
IWorkflowComponentInfo provides metadata about an IWorkflowComponent and creates new instances of it.
Definition hydrocouple.h:2130
virtual IWorkflowComponent * createComponentInstance()=0
Creates a new IModelComponent instance.
virtual ~IWorkflowComponentInfo()=default
~IWorkflowComponentInfo
The IWorkflowComponentStatusChangeEventArgs contains the information that will be passed when the IWo...
Definition hydrocouple.h:2254
virtual IWorkflowComponent::WorkflowStatus status() const =0
Gets the IWorkflowComponent's status after the status change.
virtual IWorkflowComponent * workflowComponent() const =0
Gets the IModelComponent that fired the event.
virtual ~IWorkflowComponentStatusChangeEventArgs()=default
~IComponentStatusChangeEventArgs destructor
virtual IWorkflowComponent::WorkflowStatus previousStatus() const =0
Gets the IWorkflowComponent's status before the status change.
virtual float percentProgress() const =0
Number between 0 and 100 indicating the progress made by the workflow component.
virtual bool hasProgressMonitor() const =0
Indicates whether this event has a progress monitor.
virtual std::string message() const =0
Gets additional information about the status change.
ByteOrder
The ByteOrder enum class indicates the byte order of serialized data.
Definition hydrocouple.h:43
@ BigEndian
BigEndian serialized data byte order (most significant byte first).
@ LittleEndian
LittleEndian serialized data byte order (least significant byte first).
HydroCouple namespace contains the core interface specifications for the HydroCouple component-based ...
Definition hydrocouple.h:61
std::variant< std::monostate, bool, char, int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_t, float, double, long double, std::string, std::any > hydrocouple_variant
hydrocouple_variant is a variant type that can be used to store the core value types values of differ...
Definition hydrocouple.h:104
constexpr int HYDROCOUPLE_ABI_VERSION
ABI version for the HydroCouple interface.
Definition hydrocouple.h:63
std::set< hydrocouple_variant, hydrocouple_variant_less > hydrocouple_variant_set
Type alias for an ordered set of hydrocouple_variant values.
Definition hydrocouple.h:131
Comparator for hydrocouple_variant that enables use in ordered containers.
Definition hydrocouple.h:113
bool operator()(const hydrocouple_variant &lhs, const hydrocouple_variant &rhs) const
Definition hydrocouple.h:114