HydroCouple  2.0.0-alpha.1
HydroCouple Interface Definitions
Loading...
Searching...
No Matches
hydrocouple.h
Go to the documentation of this file.
1
19
20#ifndef HYDROCOUPLE_H
21#define HYDROCOUPLE_H
22
23#include <string>
24#include <array>
25#include <vector>
26#include <span>
27#include <cstdint>
28#include <functional>
29#include <list>
30#include <set>
31#include <memory>
32#include <typeinfo>
33#include <unordered_map>
34
35
39enum class ByteOrder : uint8_t
40{
41
46
51};
52
57namespace HydroCouple
58{
60 constexpr int HYDROCOUPLE_ABI_VERSION = 2;
61
63 template <typename... Args>
64 class ISignal;
66 class IModelComponent;
68 class IArgument;
69 class IInput;
70 class IOutput;
71 class IExchangeItem;
72 class IAdaptedOutput;
74 class IUnit;
79
103
110 enum class MemorySpace : uint8_t
111 {
112 Host = 0,
116 };
117
134 {
135 void *data = nullptr;
137 int32_t rank = 0;
138 const int64_t *shape = nullptr;
139 const int64_t *stridesBytes = nullptr;
141 int32_t deviceId = 0;
142 };
143
159
167 {
171 enum class Severity : uint8_t
172 {
177 };
178
180 int32_t code = 0;
181 std::string source;
182 std::string message;
183 };
184
191 template <typename... Args>
192 class ISlot
193 {
194 public:
198 virtual ~ISlot() = default;
199
205 virtual void operator()(const ISignal<Args...> &sender, Args... args) = 0;
206 };
207
214 template <typename... Args>
216 {
217 public:
221 virtual ~ISignal() = default;
222
227 virtual void connect(const std::shared_ptr<ISlot<Args...>> &slot) = 0;
228
233 virtual void disconnect(const std::shared_ptr<ISlot<Args...>> &slot) = 0;
234
239 virtual void blockSignals(bool block) = 0;
240
241 protected:
246 virtual void emit(Args... args) = 0;
247 };
248
253 class IPropertyChanged : public virtual ISignal<std::string>
254 {
255
256 public:
260 virtual ~IPropertyChanged() = default;
261 };
262
270 class IDescription : public virtual IPropertyChanged
271 {
272
273 public:
277 virtual ~IDescription() = default;
278
284 [[nodiscard]] virtual const std::string &caption() const = 0;
285
291 virtual void setCaption(const std::string &caption) = 0;
292
298 [[nodiscard]] virtual const std::string &description() const = 0;
299
305 virtual void setDescription(const std::string &description) = 0;
306 };
307
312 class IIdentity : public virtual IDescription
313 {
314 public:
318 virtual ~IIdentity() = default;
319
330 [[nodiscard]] virtual const std::string &id() const = 0;
331 };
332
341 class IComponentInfo : public virtual IIdentity
342 {
343
344 public:
348 virtual ~IComponentInfo() = default;
349
355 [[nodiscard]] virtual std::string libraryFilePath() const = 0;
356
362 virtual void setLibraryFilePath(const std::string &filePath) = 0;
363
370 [[nodiscard]] virtual std::string iconFilePath() const = 0;
371
376 [[nodiscard]] virtual std::string developer() const = 0;
377
382 [[nodiscard]] virtual std::vector<std::string> documentation() const = 0;
383
388 [[nodiscard]] virtual std::string license() const = 0;
389
394 [[nodiscard]] virtual std::string copyright() const = 0;
395
400 [[nodiscard]] virtual std::string url() const = 0;
401
406 [[nodiscard]] virtual std::string email() const = 0;
407
412 [[nodiscard]] virtual std::string version() const = 0;
413
419 [[nodiscard]] virtual std::set<std::string> tags() const = 0;
420 };
421
430 {
431 public:
435 virtual ~ILicensedComponent() = default;
436
444 [[nodiscard]] virtual bool validateLicense(const std::string &licenseInfo, std::string &validationMessage) = 0;
445
451 [[nodiscard]] virtual bool validateLicense(std::string &validationMessage) = 0;
452 };
453
462 {
463 public:
467 virtual ~IUIProvider() = default;
468
473 [[nodiscard]] virtual bool hasEditor() const = 0;
474
479 virtual void showEditor(void *opaqueUIPointer = nullptr) = 0;
480
485 [[nodiscard]] virtual bool hasViewer() const = 0;
486
491 virtual void showViewer(void *opaqueUIPointer = nullptr) = 0;
492 };
493
501 class IModelComponentInfo : public virtual IComponentInfo
502 {
503
504 public:
508 virtual ~IModelComponentInfo() = default;
509
514 [[nodiscard]] virtual std::unique_ptr<IModelComponent> createComponentInstance() = 0;
515
526 [[nodiscard]] virtual std::vector<IAdaptedOutputFactory *> adaptedOutputFactories() const = 0;
527 };
528
532 class IModelComponent : public virtual IIdentity, public virtual ISignal<const std::shared_ptr<IComponentStatusChangeEventArgs> &>
533 {
534
535 public:
665
666 // The legal lifecycle transitions form a normative state machine. The
667 // non-normative constexpr helper isValidComponentStatusTransition() in
668 // hydrocouplehelpers.h encodes the transition table; implementations must not
669 // perform transitions that table rejects.
670
674 virtual ~IModelComponent() = default;
675
680 [[nodiscard]] virtual IModelComponentInfo *componentInfo() const = 0;
681
690 [[nodiscard]] virtual ComponentStatus status() const = 0;
691
706 [[nodiscard]] virtual std::vector<IArgument *> arguments() const = 0;
707
722 [[nodiscard]] virtual std::vector<IInput *> inputs() const = 0;
723
743 [[nodiscard]] virtual std::vector<IOutput *> outputs() const = 0;
744
749 [[nodiscard]] virtual std::vector<IComponentDataItem *> results() const = 0;
750
774 virtual void initialize() = 0;
775
800 [[nodiscard]] virtual std::vector<std::string> validate() = 0;
801
823 virtual void prepare() = 0;
824
849 virtual void update(const std::vector<IOutput *> &requiredOutputs = {}) = 0;
850
863 virtual void finish() = 0;
864
869 [[nodiscard]] virtual const IWorkflowComponent *workflow() const = 0;
870
875 virtual void setWorkflow(const IWorkflowComponent *workflow) = 0;
876
883 [[nodiscard]] virtual std::set<Capability> capabilities() const = 0;
884
895 [[nodiscard]] virtual std::vector<ErrorEntry> errors(bool clearAfterRead = false) = 0;
896
905 [[nodiscard]] virtual std::string referenceDirectory() const = 0;
906
911 virtual void setReferenceDirectory(const std::string &referenceDirectory) = 0;
912 };
913
920 {
921 public:
926
931 [[nodiscard]] virtual IModelComponent *component() const = 0;
932
937 [[nodiscard]] virtual IModelComponent::ComponentStatus previousStatus() const = 0;
938
943 [[nodiscard]] virtual IModelComponent::ComponentStatus status() const = 0;
944
949 [[nodiscard]] virtual std::string message() const = 0;
950
955 [[nodiscard]] virtual bool hasProgressMonitor() const = 0;
956
961 [[nodiscard]] virtual float percentProgress() const = 0;
962 };
963
969 {
970 public:
974 virtual ~ICloneableModelComponent() = default;
975
980 [[nodiscard]] virtual ICloneableModelComponent *parent() const = 0;
981
991 [[nodiscard]] virtual ICloneableModelComponent *clone(const std::unordered_map<std::string, std::string> &clone_optional_arguments = std::unordered_map<std::string, std::string>()) = 0;
992
997 [[nodiscard]] virtual std::vector<ICloneableModelComponent *> clones() const = 0;
998 };
999
1009 {
1010 public:
1015
1026 [[nodiscard]] virtual bool saveState(std::string &token, std::string &message) = 0;
1027
1036 [[nodiscard]] virtual bool restoreState(const std::string &token, std::string &message) = 0;
1037 };
1038
1047 class IValueDefinition : public virtual IDescription
1048 {
1049 public:
1053 virtual ~IValueDefinition() = default;
1054
1061 [[nodiscard]] virtual const std::type_info &type() const = 0;
1062
1068 [[nodiscard]] virtual double missingValue() const = 0;
1069
1075 [[nodiscard]] virtual double defaultValue() const = 0;
1076 };
1077
1081 class IDimension : public virtual IIdentity
1082 {
1083 public:
1087 enum class LengthType
1088 {
1093
1098 };
1099
1103 virtual ~IDimension() = default;
1104
1108 [[nodiscard]] virtual LengthType lengthType() const = 0;
1109 };
1110
1127 class IQuality : public virtual IValueDefinition
1128 {
1129 public:
1133 virtual ~IQuality() = default;
1134
1143 [[nodiscard]] virtual std::vector<std::string> categories() const = 0;
1144
1148 [[nodiscard]] virtual bool isOrdered() const = 0;
1149 };
1150
1154 class IUnitDimensions : public virtual IDescription
1155 {
1156 public:
1207
1211 virtual ~IUnitDimensions() = default;
1212
1238 [[nodiscard]] virtual double power(HydroCouple::IUnitDimensions::FundamentalUnitDimension dimension) = 0;
1239 };
1240
1244 class IUnit : public virtual IDescription
1245 {
1246 public:
1256
1318
1390
1394 virtual ~IUnit() = default;
1395
1399 [[nodiscard]] virtual IUnitDimensions *dimensions() const = 0;
1400
1404 [[nodiscard]] virtual double conversionFactorToSI() const = 0;
1405
1409 [[nodiscard]] virtual double offsetToSI() const = 0;
1410 };
1411
1416 class IQuantity : public virtual IValueDefinition
1417 {
1418 public:
1422 virtual ~IQuantity() = default;
1423
1427 [[nodiscard]] virtual IUnit *unit() const = 0;
1428
1433 [[nodiscard]] virtual double minValue() const = 0;
1434
1439 [[nodiscard]] virtual double maxValue() const = 0;
1440 };
1441
1465 class IComponentDataItem : public virtual IIdentity, public virtual ISignal<const std::shared_ptr<IComponentDataItemValueChanged> &>
1466 {
1467 public:
1471 virtual ~IComponentDataItem() = default;
1472
1482 [[nodiscard]] virtual IModelComponent *modelComponent() const = 0;
1483
1490 [[nodiscard]] virtual std::vector<IDimension *> dimensions() const = 0;
1491
1498 [[nodiscard]] virtual std::vector<int64_t> shape() const = 0;
1499
1504 [[nodiscard]] virtual DataKind dataKind() const = 0;
1505
1510 [[nodiscard]] virtual IValueDefinition *valueDefinition() const = 0;
1511
1528 [[nodiscard]] virtual bool getValuesInto(
1529 const BufferDescriptor &destination,
1530 std::span<const int64_t> start,
1531 std::span<const int64_t> count,
1532 std::string *message = nullptr) const = 0;
1533
1543 [[nodiscard]] virtual bool setValuesFrom(
1544 const BufferDescriptor &source,
1545 std::span<const int64_t> start,
1546 std::span<const int64_t> count,
1547 std::string *message = nullptr) = 0;
1548
1549 // Typed convenience wrappers over getValuesInto()/setValuesFrom() (scalar reads,
1550 // flat-span hyperslab reads/writes) are provided as non-normative free function
1551 // templates in hydrocouplehelpers.h; the interface itself carries no executable code.
1552 };
1553
1558 {
1559 public:
1564
1569 [[nodiscard]] virtual IComponentDataItem *componentDataItem() const = 0;
1570
1575 [[nodiscard]] virtual std::vector<int64_t> start() const = 0;
1576
1581 [[nodiscard]] virtual std::vector<int64_t> count() const = 0;
1582 };
1583
1590 class IArgument : public virtual IComponentDataItem
1591 {
1592
1593 public:
1598 {
1603
1608
1613
1618
1623
1628
1633 };
1634
1638 virtual ~IArgument() = default;
1639
1646 [[nodiscard]] virtual bool isOptional() const = 0;
1647
1655 [[nodiscard]] virtual bool isReadOnly() const = 0;
1656
1660 [[nodiscard]] virtual std::string toString() const = 0;
1661
1665 virtual void saveData() = 0;
1666
1673 [[nodiscard]] virtual std::vector<std::string> fileFilters() const = 0;
1674
1679 [[nodiscard]] virtual std::vector<const std::type_info *> validComponentDataItemTypes() const = 0;
1680
1686 [[nodiscard]] virtual bool isValidArgType(ArgumentInputType argType) const = 0;
1687
1692 [[nodiscard]] virtual ArgumentInputType currentArgumentInputType() const = 0;
1693
1701 [[nodiscard]] virtual bool initialize(const std::string &value, ArgumentInputType argType, std::string &message) = 0;
1702
1710 [[nodiscard]] virtual bool initialize(const IComponentDataItem &componentDataItem, std::string &message) = 0;
1711
1727 [[nodiscard]] virtual bool serialize(ArgumentInputType argType, std::string &value, std::string &message) const = 0;
1728 };
1729
1739 {
1740 public:
1745
1749 [[nodiscard]] virtual IExchangeItem *exchangeItem() const = 0;
1750
1754 [[nodiscard]] virtual std::string message() const = 0;
1755 };
1756
1762 class IExchangeItem : public virtual IComponentDataItem
1763 {
1764
1765 public:
1769 virtual ~IExchangeItem() = default;
1770 };
1771
1780 class IOutput : public virtual IExchangeItem
1781 {
1782 public:
1786 virtual ~IOutput() = default;
1787
1799 [[nodiscard]] virtual std::vector<IInput *> consumers() const = 0;
1800
1814 virtual void addConsumer(IInput *consumer) = 0;
1815
1825 [[nodiscard]] virtual bool removeConsumer(IInput *consumer) = 0;
1826
1836 [[nodiscard]] virtual std::vector<IAdaptedOutput *> adaptedOutputs() const = 0;
1837
1850 virtual void addAdaptedOutput(IAdaptedOutput *adaptedOutput) = 0;
1851
1861 [[nodiscard]] virtual bool removeAdaptedOutput(IAdaptedOutput *adaptedOutput) = 0;
1862
1877 virtual void updateValues(const IInput *querySpecifier) = 0;
1878 };
1879
1892 class IAdaptedOutput : public virtual IOutput
1893 {
1894 public:
1898 virtual ~IAdaptedOutput() = default;
1899
1907 [[nodiscard]] virtual IAdaptedOutputFactory *adaptedOutputFactory() const = 0;
1908
1917 [[nodiscard]] virtual std::vector<IArgument *> arguments() const = 0;
1918
1929 virtual void initialize() = 0;
1930
1938 [[nodiscard]] virtual IOutput *adaptee() const = 0;
1939
1951 virtual void refresh() = 0;
1952 };
1953
1962 class IAdaptedOutputFactory : public virtual IIdentity
1963 {
1964 public:
1968 virtual ~IAdaptedOutputFactory() = default;
1969
1981 [[nodiscard]] virtual std::vector<IIdentity *> getAvailableAdaptedOutputIds(const IOutput *provider, const IInput *consumer = nullptr) = 0;
1982
1994 [[nodiscard]] virtual std::unique_ptr<IAdaptedOutput> createAdaptedOutput(IIdentity *adaptedProviderId, IOutput *provider, IInput *consumer = nullptr) = 0;
1995 };
1996
2006 {
2007 public:
2012
2017 };
2018
2025 {
2026 public:
2031
2037 [[nodiscard]] virtual IAdaptedOutputFactoryComponentInfo *componentInfo() const = 0;
2038 };
2039
2043 class IInput : public virtual IExchangeItem
2044 {
2045 public:
2049 virtual ~IInput() = default;
2050
2054 [[nodiscard]] virtual IOutput *provider() const = 0;
2055
2061 [[nodiscard]] virtual bool setProvider(IOutput *provider) = 0;
2062
2069 [[nodiscard]] virtual bool canConsume(IOutput *provider, std::string &message) const = 0;
2070 };
2071
2075 class IMultiInput : public virtual IInput
2076 {
2077 public:
2081 virtual ~IMultiInput() = default;
2082
2086 [[nodiscard]] virtual std::vector<IIdentity *> providerLabels() const = 0;
2087
2093 [[nodiscard]] virtual bool isRequiredProvider(const IIdentity *providerLabel) const = 0;
2094
2099 [[nodiscard]] virtual std::vector<IOutput *> providers() const = 0;
2100
2108 [[nodiscard]] virtual bool canConsume(IOutput *provider, std::string &message, const IIdentity *providerRoleIdentifier = nullptr) const = 0;
2109
2115 [[nodiscard]] virtual bool addProvider(IOutput *provider, const IIdentity *providerRoleIdentifier = nullptr) = 0;
2116
2122 [[nodiscard]] virtual bool removeProvider(IOutput *provider) = 0;
2123 };
2124
2132 {
2133
2134 public:
2138 virtual ~IIdBasedComponentDataItem() = default;
2139
2144 [[nodiscard]] virtual std::vector<std::string> identifiers() const = 0;
2145
2153 [[nodiscard]] virtual IDimension *identifierDimension() const = 0;
2154 };
2155
2161 {
2162
2163 public:
2167 virtual ~IWorkflowComponentInfo() = default;
2168
2173 [[nodiscard]] virtual IWorkflowComponent *createComponentInstance() = 0;
2174 };
2175
2182 class IWorkflowComponent : public virtual IIdentity, public virtual ISignal<const std::shared_ptr<IWorkflowComponentStatusChangeEventArgs> &>
2183 {
2184
2185 public:
2221
2225 virtual ~IWorkflowComponent() = default;
2226
2231 [[nodiscard]] virtual IWorkflowComponentInfo *componentInfo() const = 0;
2232
2237 [[nodiscard]] virtual std::vector<IIdentity *> modelComponentLabels() const = 0;
2238
2244 [[nodiscard]] virtual bool isRequiredModelComponent(const IIdentity *modelComponentLabel) const = 0;
2245
2249 virtual void initialize() = 0;
2250
2266 [[nodiscard]] virtual std::vector<std::string> validate() = 0;
2267
2278 virtual void prepare() = 0;
2279
2292 virtual void update() = 0;
2293
2297 virtual void finish() = 0;
2298
2307 virtual void requestStop() = 0;
2308
2318 virtual void requestPause() = 0;
2319
2327 virtual void resume() = 0;
2328
2340 [[nodiscard]] virtual std::vector<ErrorEntry> errors(bool clearAfterRead = false) = 0;
2341
2346 [[nodiscard]] virtual WorkflowStatus status() const = 0;
2347
2352 [[nodiscard]] virtual std::vector<IModelComponent *> modelComponents() const = 0;
2353
2363 [[nodiscard]] virtual bool addModelComponent(IModelComponent *component, const IIdentity *modelRoleIdentifier = nullptr, std::string *message = nullptr) = 0;
2364
2370 [[nodiscard]] virtual bool removeModelComponent(IModelComponent *component) = 0;
2371 };
2372
2378 {
2379 public:
2384
2389 [[nodiscard]] virtual IWorkflowComponent *workflowComponent() const = 0;
2390
2395 [[nodiscard]] virtual IWorkflowComponent::WorkflowStatus previousStatus() const = 0;
2396
2401 [[nodiscard]] virtual IWorkflowComponent::WorkflowStatus status() const = 0;
2402
2407 [[nodiscard]] virtual std::string message() const = 0;
2408
2413 [[nodiscard]] virtual bool hasProgressMonitor() const = 0;
2414
2419 [[nodiscard]] virtual float percentProgress() const = 0;
2420 };
2421
2422}
2423
2424#endif // HYDROCOUPLE_H
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.
An IInput item that can accept values for an IModelComponent.
Definition hydrocouple.h:2044
virtual bool canConsume(IOutput *provider, std::string &message) const =0
Returns true if this IInput can consume this producer.
virtual ~IInput()=default
IInput::~IInput is a virtual destructor.
virtual IOutput * provider() 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.
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...
The IMultiInput class is an IInput class that has multiple outputs supplying data to it.
Definition hydrocouple.h:2076
virtual bool isRequiredProvider(const IIdentity *providerLabel) const =0
isRequiredProvider checks if the provider is required by the consumer.
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.
virtual std::vector< IOutput * > providers() const =0
Gets the list of providers supplying data to this multi-input.
virtual std::vector< IIdentity * > providerLabels() const =0
virtual ~IMultiInput()=default
IMultiInput::~IMultiInput is a virtual destructor.
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