33#include <unordered_map>
63 template <
typename... Args>
191 template <
typename... Args>
214 template <
typename... Args>
246 virtual void emit(Args... args) = 0;
284 [[nodiscard]]
virtual const std::string &
caption()
const = 0;
330 [[nodiscard]]
virtual const std::string &
id()
const = 0;
376 [[nodiscard]]
virtual std::string
developer()
const = 0;
388 [[nodiscard]]
virtual std::string
license()
const = 0;
394 [[nodiscard]]
virtual std::string
copyright()
const = 0;
400 [[nodiscard]]
virtual std::string
url()
const = 0;
406 [[nodiscard]]
virtual std::string
email()
const = 0;
412 [[nodiscard]]
virtual std::string
version()
const = 0;
419 [[nodiscard]]
virtual std::set<std::string>
tags()
const = 0;
444 [[nodiscard]]
virtual bool validateLicense(
const std::string &licenseInfo, std::string &validationMessage) = 0;
479 virtual void showEditor(
void *opaqueUIPointer =
nullptr) = 0;
491 virtual void showViewer(
void *opaqueUIPointer =
nullptr) = 0;
706 [[nodiscard]]
virtual std::vector<IArgument *>
arguments()
const = 0;
722 [[nodiscard]]
virtual std::vector<IInput *>
inputs()
const = 0;
743 [[nodiscard]]
virtual std::vector<IOutput *>
outputs()
const = 0;
749 [[nodiscard]]
virtual std::vector<IComponentDataItem *>
results()
const = 0;
800 [[nodiscard]]
virtual std::vector<std::string>
validate() = 0;
849 virtual void update(
const std::vector<IOutput *> &requiredOutputs = {}) = 0;
895 [[nodiscard]]
virtual std::vector<ErrorEntry>
errors(
bool clearAfterRead =
false) = 0;
949 [[nodiscard]]
virtual std::string
message()
const = 0;
991 [[nodiscard]]
virtual ICloneableModelComponent *
clone(
const std::unordered_map<std::string, std::string> &clone_optional_arguments = std::unordered_map<std::string, std::string>()) = 0;
997 [[nodiscard]]
virtual std::vector<ICloneableModelComponent *>
clones()
const = 0;
1026 [[nodiscard]]
virtual bool saveState(std::string &token, std::string &message) = 0;
1036 [[nodiscard]]
virtual bool restoreState(
const std::string &token, std::string &message) = 0;
1061 [[nodiscard]]
virtual const std::type_info &
type()
const = 0;
1143 [[nodiscard]]
virtual std::vector<std::string>
categories()
const = 0;
1490 [[nodiscard]]
virtual std::vector<IDimension *>
dimensions()
const = 0;
1498 [[nodiscard]]
virtual std::vector<int64_t>
shape()
const = 0;
1530 std::span<const int64_t> start,
1531 std::span<const int64_t> count,
1532 std::string *message =
nullptr)
const = 0;
1545 std::span<const int64_t> start,
1546 std::span<const int64_t> count,
1547 std::string *message =
nullptr) = 0;
1575 [[nodiscard]]
virtual std::vector<int64_t>
start()
const = 0;
1581 [[nodiscard]]
virtual std::vector<int64_t>
count()
const = 0;
1660 [[nodiscard]]
virtual std::string
toString()
const = 0;
1673 [[nodiscard]]
virtual std::vector<std::string>
fileFilters()
const = 0;
1754 [[nodiscard]]
virtual std::string
message()
const = 0;
1799 [[nodiscard]]
virtual std::vector<IInput *>
consumers()
const = 0;
1917 [[nodiscard]]
virtual std::vector<IArgument *>
arguments()
const = 0;
2099 [[nodiscard]]
virtual std::vector<IOutput *>
providers()
const = 0;
2144 [[nodiscard]]
virtual std::vector<std::string>
identifiers()
const = 0;
2266 [[nodiscard]]
virtual std::vector<std::string>
validate() = 0;
2340 [[nodiscard]]
virtual std::vector<ErrorEntry>
errors(
bool clearAfterRead =
false) = 0;
2407 [[nodiscard]]
virtual std::string
message()
const = 0;
IAdaptedOutputFactoryComponent is an IAdaptedOutputFactory generated from an IAdaptedOutputFactoryCom...
Definition hydrocouple.h:2025
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:2006
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:1963
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:1893
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:1591
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:1598
@ File
Enumeration indicating that the argument was read from a file.
Definition hydrocouple.h:1607
@ JSON
Enumeration indicating that the argument input is in JSON format.
Definition hydrocouple.h:1612
@ String
Enumeration indicating that the argument was read from string.
Definition hydrocouple.h:1602
@ XML
Enumeration indicating that the argument input is in XML format.
Definition hydrocouple.h:1622
@ YAML
Enumeration indicating that the argument input is in YAML format.
Definition hydrocouple.h:1617
@ URL
Enumeration indicating that the argument was read from a URL.
Definition hydrocouple.h:1627
@ MEMORY_OBJECT
Enumeration indicating that the argument was read from a memory object.
Definition hydrocouple.h:1632
virtual bool serialize(ArgumentInputType argType, std::string &value, std::string &message) const =0
Serializes this argument's current value to the requested representation.
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.
ICheckpointableModelComponent is an IModelComponent that can save and restore its complete simulation...
Definition hydrocouple.h:1009
virtual bool restoreState(const std::string &token, std::string &message)=0
Restores state previously saved by saveState().
virtual bool saveState(std::string &token, std::string &message)=0
Saves the component's complete state.
virtual ~ICheckpointableModelComponent()=default
~ICheckpointableModelComponent destructor.
The ICloneableModelComponent class is an IModelComponent that supports deep cloning of itself and its...
Definition hydrocouple.h:969
virtual ICloneableModelComponent * clone(const std::unordered_map< std::string, std::string > &clone_optional_arguments=std::unordered_map< std::string, std::string >())=0
Deep clones itself including cloning its IArgument instances.
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()=default
~ICloneableModelComponent destructor
IComponentDataItem is a fundamental unit of data for a component.
Definition hydrocouple.h:1466
virtual std::vector< int64_t > shape() const =0
The extent of each dimension of this data item's index space.
virtual IModelComponent * modelComponent() const =0
Gets the owner IModelComponent of this IComponentItem. For an IOutput component item this is the comp...
virtual std::vector< IDimension * > dimensions() const =0
provides purely descriptive information of the dimensions associated with this IComponentItem
virtual ~IComponentDataItem()=default
IComponentDataItem::~IComponentDataItem is a virtual destructor.
virtual bool getValuesInto(const BufferDescriptor &destination, std::span< const int64_t > start, std::span< const int64_t > count, std::string *message=nullptr) const =0
Copies a hyperslab of this item's values into a caller-described buffer.
virtual DataKind dataKind() const =0
The element type of this data item's values.
virtual bool setValuesFrom(const BufferDescriptor &source, std::span< const int64_t > start, std::span< const int64_t > count, std::string *message=nullptr)=0
Copies values from a caller-described buffer into a hyperslab of this item.
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:1558
virtual std::vector< int64_t > start() const =0
Gets the start index of the hyperslab that changed.
virtual ~IComponentDataItemValueChanged()=default
IComponentDataItemValueChanged::~IComponentDataItemValueChanged is a virtual destructor.
virtual IComponentDataItem * componentDataItem() const =0
Gets the IComponentDataItem that fired the event.
virtual std::vector< int64_t > count() const =0
Gets the extent of the hyperslab that changed.
IComponentInfo interface class is a factory that provides detailed metadata about a component and cre...
Definition hydrocouple.h:342
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 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:920
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:271
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:1082
virtual ~IDimension()=default
~IDimension destructor
LengthType
IDimension::LengthType dimension length type.
Definition hydrocouple.h:1088
@ Static
Static length type.
Definition hydrocouple.h:1092
@ Dynamic
Dynamic length type.
Definition hydrocouple.h:1097
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:1739
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:1763
virtual ~IExchangeItem()=default
IExchangeItem::~IExchangeItem is a virtual destructor.
IIdBasedComponentDataItem is an IComponentDataItem whose data is indexed by string identifiers.
Definition hydrocouple.h:2132
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
identifierDimension returns the identifier dimension of the id based component item.
IIdentity interface class defines a method to get the Id of an HydroCouple entity.
Definition hydrocouple.h:313
virtual ~IIdentity()=default
IIdentity::~IIdentity is a virtual destructor.
virtual const std::string & id() const =0
Gets a unique identifier for the entity.
ILicensedComponent is an optional side interface for components that require license validation.
Definition hydrocouple.h:430
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 ~ILicensedComponent()=default
ILicensedComponent::~ILicensedComponent is a virtual destructor.
IModelComponent interface is the core interface in the HydroCouple standard defining a model componen...
Definition hydrocouple.h:533
virtual void setWorkflow(const IWorkflowComponent *workflow)=0
Sets the workflow that this component is part of.
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 void initialize()=0
Initializes the current IModelComponent.
virtual std::vector< ErrorEntry > errors(bool clearAfterRead=false)=0
Drains this component's diagnostic queue.
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 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 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 std::vector< std::string > validate()=0
Validates the populated instance of the IModelComponent.
virtual std::set< Capability > capabilities() const =0
The set of optional capabilities this component supports.
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:541
@ Checkpointing
The IModelComponent is saving or restoring a checkpoint of its state (see ICheckpointableModelCompone...
Definition hydrocouple.h:625
@ Created
The IModelComponent instance has just been created. This status must and will be followed by HydroCou...
Definition hydrocouple.h:546
@ Finishing
The IModelComponent was requested to perform the actions to be performed before it will either be dis...
Definition hydrocouple.h:640
@ WaitingForData
The IModelComponent wants to update itself, but is not yet able to perform the actual computation,...
Definition hydrocouple.h:585
@ Initializing
The IModelComponent is initializing itself. This status will end in a status change to HydroCouple::I...
Definition hydrocouple.h:552
@ Valid
The IModelComponent is in a HydroCouple::Valid state. When updating itself its required input will be...
Definition hydrocouple.h:578
@ Invalid
The IModelComponent is in an HydroCouple::Invalid state. When updating itself not all required input ...
Definition hydrocouple.h:595
@ Initialized
The IModelComponent has successfully initialized itself by calling IModelComponent::initialize()....
Definition hydrocouple.h:560
@ Updating
The IModelComponent is updating itself. It has received all required input data from other components...
Definition hydrocouple.h:613
@ Finished
The IModelComponent has successfully performed its finalization actions. Re-initialization of the IMo...
Definition hydrocouple.h:656
@ Preparing
The IModelComponent is preparing itself for the first IComponentDataItem::getValue() call....
Definition hydrocouple.h:604
@ Validating
After links between an IModelComponent's inputs/outputs and those of other components have been estab...
Definition hydrocouple.h:571
@ Failed
The IModelComponent has encountered an unrecoverable error. Diagnostics describing the failure must b...
Definition hydrocouple.h:663
@ Done
The last update process that the IModelComponent performed was the final one. A next call to the IMod...
Definition hydrocouple.h:631
@ Updated
The IModelComponent has successfully updated itself.
Definition hydrocouple.h:618
virtual ComponentStatus status() const =0
Defines current status of the IModelComponent. See IModelComponent::ComponentStatus for the possible ...
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 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:502
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:1781
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:254
virtual ~IPropertyChanged()=default
IPropertyChanged::~IPropertyChanged is a virtual destructor.
IQuality describes qualitative data, where a value is specified as one category within a number of pr...
Definition hydrocouple.h:1128
virtual bool isOrdered() const =0
Checks if the IQuality is defined by an ordered set of ICategory or not.
virtual std::vector< std::string > categories() const =0
The possible category labels allowed for this IQuality.
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:1417
virtual double minValue() const =0
Gets the minimum allowed value for this quantity.
virtual ~IQuantity()=default
IQuantity::~IQuantity is a virtual destructor.
virtual IUnit * unit() const =0
Unit of quantity.
virtual double maxValue() const =0
Gets the maximum allowed value for this quantity.
Forward declarations.
Definition hydrocouple.h:216
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:193
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.
IUIProvider is an optional side interface for entities that can present a graphical editor and/or vie...
Definition hydrocouple.h:462
virtual void showEditor(void *opaqueUIPointer=nullptr)=0
showEditor shows the editor for this entity.
virtual bool hasViewer() const =0
hasViewer indicates whether this entity has a UI viewer.
virtual void showViewer(void *opaqueUIPointer=nullptr)=0
showViewer shows the viewer for this entity.
virtual bool hasEditor() const =0
hasEditor indicates whether this entity has a UI editor.
virtual ~IUIProvider()=default
IUIProvider::~IUIProvider is a virtual destructor.
Defines the order of dimension in each FundamentalDimension for a unit.
Definition hydrocouple.h:1155
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:1161
@ Currency
Fundamental dimension for currency.
Definition hydrocouple.h:1200
@ Unitless
Fundamental dimension for unitless quantities.
Definition hydrocouple.h:1205
@ ElectricCurrent
Fundamental dimension for electric current.
Definition hydrocouple.h:1180
@ Time
Fundamental dimension for time.
Definition hydrocouple.h:1175
@ Length
Fundamental dimension for length.
Definition hydrocouple.h:1165
@ AmountOfSubstance
Fundamental dimension for amount of substance.
Definition hydrocouple.h:1190
@ LuminousIntensity
Fundamental dimension for luminous intensity.
Definition hydrocouple.h:1195
@ Temperature
Fundamental dimension for temperature.
Definition hydrocouple.h:1185
@ Mass
Fundamental dimension for mass.
Definition hydrocouple.h:1170
IUnit interface, describing the physical unit of a IQuantity.
Definition hydrocouple.h:1245
DistanceUnits
HydroCouple::DistanceUnits are the types of units that can be used to measure distance.
Definition hydrocouple.h:1261
@ Feet
Feet.
Definition hydrocouple.h:1276
@ Centimeters
Centimeters.
Definition hydrocouple.h:1301
@ Millimeters
Millimeters.
Definition hydrocouple.h:1306
@ Miles
Miles.
Definition hydrocouple.h:1291
@ Meters
Meters.
Definition hydrocouple.h:1266
@ Yards
Yards.
Definition hydrocouple.h:1286
@ Degrees
Degrees.
Definition hydrocouple.h:1296
@ Inches
Inches.
Definition hydrocouple.h:1311
@ NauticalMiles
NauticalMiles.
Definition hydrocouple.h:1281
@ Kilometers
Kilometers.
Definition hydrocouple.h:1271
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:1323
@ Acres
Acres.
Definition hydrocouple.h:1358
@ SquareFeet
Square Feet.
Definition hydrocouple.h:1338
@ SquareCentimeters
Square Centimeters.
Definition hydrocouple.h:1373
@ SquareInches
Square Inches.
Definition hydrocouple.h:1383
@ SquareNauticalMiles
Square Nautical Miles.
Definition hydrocouple.h:1363
@ SquareMillimeters
Square Millimeters.
Definition hydrocouple.h:1378
@ SquareYards
Square Yards.
Definition hydrocouple.h:1343
@ Hectares
Hectares.
Definition hydrocouple.h:1353
@ SquareKilometers
SquareKilometers.
Definition hydrocouple.h:1333
@ SquareMeters
SquareMeters.
Definition hydrocouple.h:1328
@ SquareDegrees
Square Degrees.
Definition hydrocouple.h:1368
@ SquareMiles
Square Miles.
Definition hydrocouple.h:1348
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:1251
@ Geographic
Definition hydrocouple.h:1253
@ Unknown
Definition hydrocouple.h:1254
@ Standard
Definition hydrocouple.h:1252
IValueDefinition describes the type and properties of values returned by IComponentDataItem::getValue...
Definition hydrocouple.h:1048
virtual double defaultValue() const =0
Gets the default value for this value definition.
virtual double missingValue() const =0
The value representing that data is missing.
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:2183
virtual ~IWorkflowComponent()=default
~IWorkflowComponent destructor for IWorkflowComponent class.
virtual std::vector< IModelComponent * > modelComponents() const =0
Gets the model components managed by this workflow.
virtual void update()=0
Performs one orchestration step.
virtual bool addModelComponent(IModelComponent *component, const IIdentity *modelRoleIdentifier=nullptr, std::string *message=nullptr)=0
addModelComponent Adds model component instance to workflow
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 resume()=0
Resumes a paused workflow.
virtual void initialize()=0
Initializes the workflow component.
virtual void requestPause()=0
Requests a cooperative pause of the workflow.
virtual std::vector< ErrorEntry > errors(bool clearAfterRead=false)=0
Drains this workflow's diagnostic queue.
virtual IWorkflowComponentInfo * componentInfo() const =0
Gets the metadata information about this workflow component.
virtual void prepare()=0
Prepares the composition for computation.
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:2191
@ Created
The workflow component has just been created.
Definition hydrocouple.h:2193
@ Finishing
The workflow component is finalizing and releasing resources.
Definition hydrocouple.h:2215
@ Initializing
The workflow component is initializing itself.
Definition hydrocouple.h:2195
@ Prepared
The workflow component has prepared the composition and can begin updating.
Definition hydrocouple.h:2205
@ Validated
The workflow component found the composition valid and ready to prepare.
Definition hydrocouple.h:2201
@ Initialized
The workflow component has successfully initialized.
Definition hydrocouple.h:2197
@ Updating
The workflow component is performing an update step.
Definition hydrocouple.h:2207
@ Finished
The workflow component has finished and cannot be restarted.
Definition hydrocouple.h:2217
@ Preparing
The workflow component is preparing the composition for computation (e.g., driving IModelComponent::p...
Definition hydrocouple.h:2203
@ Validating
The workflow component is validating the composition (cross-component links, required roles).
Definition hydrocouple.h:2199
@ Failed
The workflow component encountered an error.
Definition hydrocouple.h:2219
@ Paused
The workflow component is paused at a synchronization point (see requestPause()) and can be resumed.
Definition hydrocouple.h:2211
@ Done
The workflow component has completed all update steps.
Definition hydrocouple.h:2213
@ Updated
The workflow component has successfully updated.
Definition hydrocouple.h:2209
virtual void finish()=0
Finalizes the workflow component and releases resources.
virtual void requestStop()=0
Requests a cooperative stop of the workflow.
virtual bool isRequiredModelComponent(const IIdentity *modelComponentLabel) const =0
isRequiredModelComponent checks if the model component is required by this component.
virtual std::vector< std::string > validate()=0
Validates the composition as a whole before computation begins.
IWorkflowComponentInfo provides metadata about an IWorkflowComponent and creates new instances of it.
Definition hydrocouple.h:2161
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:2378
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:40
@ BigEndian
BigEndian serialized data byte order (most significant byte first).
Definition hydrocouple.h:45
@ LittleEndian
LittleEndian serialized data byte order (least significant byte first).
Definition hydrocouple.h:50
HydroCouple namespace contains the core interface specifications for the HydroCouple component-based ...
Definition hydrocouple.h:58
constexpr int HYDROCOUPLE_ABI_VERSION
ABI version for the HydroCouple interface.
Definition hydrocouple.h:60
DataKind
DataKind identifies the element type of a typed data buffer.
Definition hydrocouple.h:87
@ Float32
float
Definition hydrocouple.h:97
@ String
std::string (host memory only)
Definition hydrocouple.h:100
@ Boolean
bool (stored one element per byte)
Definition hydrocouple.h:99
@ Int16
int16_t
Definition hydrocouple.h:91
@ Int8
int8_t
Definition hydrocouple.h:89
@ Unknown
No/unknown element type.
Definition hydrocouple.h:88
@ UInt16
uint16_t
Definition hydrocouple.h:92
@ UInt64
uint64_t
Definition hydrocouple.h:96
@ UInt8
uint8_t
Definition hydrocouple.h:90
@ Int32
int32_t
Definition hydrocouple.h:93
@ Float64
double
Definition hydrocouple.h:98
@ UInt32
uint32_t
Definition hydrocouple.h:94
@ Opaque
Implementation-defined bytes (element size must be agreed out of band).
Definition hydrocouple.h:101
@ Int64
int64_t
Definition hydrocouple.h:95
MemorySpace
MemorySpace identifies where a buffer's bytes physically live.
Definition hydrocouple.h:111
@ Unified
Unified/managed memory accessible from host and device.
Definition hydrocouple.h:115
@ HostPinned
Page-locked host memory (fast staging to/from devices).
Definition hydrocouple.h:113
@ Host
Ordinary pageable host memory.
Definition hydrocouple.h:112
@ Device
Accelerator-resident memory addressed by (backend, deviceId).
Definition hydrocouple.h:114
Capability
Capability identifies an optional behavior a component may support.
Definition hydrocouple.h:150
@ Checkpointing
Component implements ICheckpointableModelComponent.
Definition hydrocouple.h:154
@ Licensing
Component implements ILicensedComponent.
Definition hydrocouple.h:157
@ DeviceBuffers
Data items can produce/accept Device/Unified BufferDescriptors.
Definition hydrocouple.h:151
@ PartitionedData
Component exposes partitioned data items (see hydrocoupledistributed.h).
Definition hydrocouple.h:152
@ Cloneable
Component implements ICloneableModelComponent.
Definition hydrocouple.h:155
@ DistributedExecution
Component implements IDistributedModelComponent.
Definition hydrocouple.h:153
@ UserInterface
Component implements IUIProvider.
Definition hydrocouple.h:156
BufferDescriptor describes a typed, possibly strided, possibly device-resident multi-dimensional arra...
Definition hydrocouple.h:134
MemorySpace space
Memory space holding the bytes.
Definition hydrocouple.h:140
int32_t deviceId
Device ordinal when space is Device/Unified.
Definition hydrocouple.h:141
DataKind kind
Element type.
Definition hydrocouple.h:136
const int64_t * stridesBytes
Byte step per dimension; nullptr => C-contiguous.
Definition hydrocouple.h:139
int32_t rank
Number of dimensions; 0 denotes a scalar.
Definition hydrocouple.h:137
const int64_t * shape
Extent per dimension; length == rank.
Definition hydrocouple.h:138
void * data
Base address of element (0, 0, ..., 0).
Definition hydrocouple.h:135
ErrorEntry is one diagnostic record in a component's error queue.
Definition hydrocouple.h:167
std::string message
Human-readable description.
Definition hydrocouple.h:182
Severity severity
Severity of this record.
Definition hydrocouple.h:179
std::string source
Id of the originating entity.
Definition hydrocouple.h:181
Severity
Severity of an ErrorEntry.
Definition hydrocouple.h:172
@ Warning
Recoverable anomaly.
Definition hydrocouple.h:174
@ Fatal
Component is in the Failed state.
Definition hydrocouple.h:176
@ Error
Operation failed; component may continue.
Definition hydrocouple.h:175
@ Information
Informational message.
Definition hydrocouple.h:173
int32_t code
Implementation-defined error code.
Definition hydrocouple.h:180