HydroCouple  2.0.0
HydroCouple Interface Definitions
Loading...
Searching...
No Matches
hydrocouple.h
Go to the documentation of this file.
1
21#ifndef HYDROCOUPLE_H
22#define HYDROCOUPLE_H
23
24#include <variant>
25#include <string>
26#include <array>
27#include <vector>
28#include <span>
29#include <any>
30#include <cstdint>
31#include <functional>
32#include <list>
33#include <set>
34#include <memory>
35#include <typeinfo>
36#include <unordered_map>
37
38
42enum class ByteOrder : uint8_t
43{
44
48 BigEndian = 0,
49
53 LittleEndian = 1
54};
55
60namespace HydroCouple
61{
63 constexpr int HYDROCOUPLE_ABI_VERSION = 2;
64
66 template <typename... Args>
67 class ISignal;
69 class IModelComponent;
71 class IArgument;
72 class IInput;
73 class IOutput;
74 class IExchangeItem;
75 class IAdaptedOutput;
78 class IUnit;
84
88 using hydrocouple_variant = std::variant<
89 std::monostate,
90 bool,
91 char,
92 int8_t,
93 int16_t,
94 int32_t,
95 int64_t,
96 uint8_t,
97 uint16_t,
98 uint32_t,
99 uint64_t,
100 float,
101 double,
102 long double,
103 std::string,
104 std::any>;
105
113 {
114 bool operator()(const hydrocouple_variant &lhs, const hydrocouple_variant &rhs) const
116 if (lhs.index() != rhs.index())
117 return lhs.index() < rhs.index();
118 return std::visit([&rhs](const auto &a) -> bool
119 {
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>)
122 return false;
123 else
124 return a < std::get<T>(rhs); }, lhs);
125 }
126 };
127
131 using hydrocouple_variant_set = std::set<hydrocouple_variant, hydrocouple_variant_less>;
132
139 template <typename... Args>
140 class ISlot
141 {
142 public:
146 virtual ~ISlot() = default;
147
153 virtual void operator()(const ISignal<Args...> &sender, Args... args) = 0;
154 };
155
162 template <typename... Args>
164 {
165 public:
169 virtual ~ISignal() = default;
170
175 virtual void connect(const std::shared_ptr<ISlot<Args...>> &slot) = 0;
176
181 virtual void disconnect(const std::shared_ptr<ISlot<Args...>> &slot) = 0;
182
187 virtual void blockSignals(bool block) = 0;
188
189 protected:
194 virtual void emit(Args... args) = 0;
195 };
196
201 class IPropertyChanged : public virtual ISignal<std::string>
202 {
203
204 public:
208 virtual ~IPropertyChanged() = default;
209 };
210
218 class IDescription : public virtual IPropertyChanged
219 {
220
221 public:
225 virtual ~IDescription() = default;
226
232 [[nodiscard]] virtual const std::string &caption() const = 0;
233
239 virtual void setCaption(const std::string &caption) = 0;
240
246 [[nodiscard]] virtual const std::string &description() const = 0;
247
253 virtual void setDescription(const std::string &description) = 0;
254 };
255
260 class IIdentity : public virtual IDescription
261 {
262 public:
266 virtual ~IIdentity() = default;
267
278 [[nodiscard]] virtual const std::string &id() const = 0;
279 };
280
289 class IComponentInfo : public virtual IIdentity
290 {
291
292 public:
296 virtual ~IComponentInfo() = default;
297
303 [[nodiscard]] virtual std::string libraryFilePath() const = 0;
304
310 virtual void setLibraryFilePath(const std::string &filePath) = 0;
311
318 [[nodiscard]] virtual std::string iconFilePath() const = 0;
319
324 [[nodiscard]] virtual std::string developer() const = 0;
325
330 [[nodiscard]] virtual std::vector<std::string> documentation() const = 0;
331
336 [[nodiscard]] virtual std::string license() const = 0;
337
342 [[nodiscard]] virtual std::string copyright() const = 0;
343
348 [[nodiscard]] virtual std::string url() const = 0;
349
354 [[nodiscard]] virtual std::string email() const = 0;
355
360 [[nodiscard]] virtual std::string version() const = 0;
361
367 [[nodiscard]] virtual std::set<std::string> tags() const = 0;
368
376 [[nodiscard]] virtual bool validateLicense(const std::string &licenseInfo, std::string &validationMessage) = 0;
377
383 [[nodiscard]] virtual bool validateLicense(std::string &validationMessage) = 0;
384 };
385
393 class IModelComponentInfo : public virtual IComponentInfo
394 {
395
396 public:
400 virtual ~IModelComponentInfo() = default;
401
406 [[nodiscard]] virtual std::unique_ptr<IModelComponent> createComponentInstance() = 0;
407
418 [[nodiscard]] virtual std::vector<IAdaptedOutputFactory *> adaptedOutputFactories() const = 0;
419 };
420
424 class IModelComponent : public virtual IIdentity, public virtual ISignal<const std::shared_ptr<IComponentStatusChangeEventArgs> &>
425 {
426
427 public:
433 {
438 Created,
439
445
453
464
470 Valid,
471
478
487 Invalid,
488
496 Preparing,
497
505 Updating,
506
510 Updated,
511
516 Done,
517
525 Finishing,
526
532 Finished,
533
540 Failed,
541 };
542
546 virtual ~IModelComponent() = default;
547
552 [[nodiscard]] virtual IModelComponentInfo *componentInfo() const = 0;
553
562 [[nodiscard]] virtual ComponentStatus status() const = 0;
563
578 [[nodiscard]] virtual std::vector<IArgument *> arguments() const = 0;
579
594 [[nodiscard]] virtual std::vector<IInput *> inputs() const = 0;
595
615 [[nodiscard]] virtual std::vector<IOutput *> outputs() const = 0;
616
621 [[nodiscard]] virtual std::vector<IComponentDataItem *> results() const = 0;
622
646 virtual void initialize() = 0;
647
672 [[nodiscard]] virtual std::vector<std::string> validate() = 0;
673
695 virtual void prepare() = 0;
696
721 virtual void update(const std::vector<IOutput *> &requiredOutputs = {}) = 0;
722
735 virtual void finish() = 0;
736
741 [[nodiscard]] virtual const IWorkflowComponent *workflow() const = 0;
742
747 virtual void setWorkflow(const IWorkflowComponent *workflow) = 0;
748
753 [[nodiscard]] virtual int mpiNumOfProcesses() const = 0;
754
759 [[nodiscard]] virtual int mpiProcessRank() const = 0;
760
765 virtual void mpiSetProcessRank(int processRank) = 0;
766
771 [[nodiscard]] virtual std::set<int> mpiAllocatedProcesses() const = 0;
772
781 virtual void mpiAllocateProcesses(const std::set<int> &mpiProcessesToAllocate) = 0;
782
786 virtual void mpiClearAllocatedProcesses() = 0;
787
796 [[nodiscard]] virtual std::string referenceDirectory() const = 0;
797
802 virtual void setReferenceDirectory(const std::string &referenceDirectory) = 0;
803
808 [[nodiscard]] virtual bool hasEditor() const = 0;
809
814 virtual void showEditor(void *opaqueUIPointer = nullptr) = 0;
815
820 [[nodiscard]] virtual bool hasViewer() const = 0;
821
826 virtual void showViewer(void *opaqueUIPointer = nullptr) = 0;
827 };
828
834 {
835
836 public:
840 virtual ~IProxyModelComponent() = default;
841
846 [[nodiscard]] virtual int parentMpiProcessRank() const = 0;
847
852 [[nodiscard]] virtual std::string parentProcessAddress() const = 0;
853
858 [[nodiscard]] virtual std::string parentId() const = 0;
859 };
860
867 {
868 public:
873
878 [[nodiscard]] virtual IModelComponent *component() const = 0;
879
884 [[nodiscard]] virtual IModelComponent::ComponentStatus previousStatus() const = 0;
885
890 [[nodiscard]] virtual IModelComponent::ComponentStatus status() const = 0;
891
896 [[nodiscard]] virtual std::string message() const = 0;
897
902 [[nodiscard]] virtual bool hasProgressMonitor() const = 0;
903
908 [[nodiscard]] virtual float percentProgress() const = 0;
909 };
910
916 {
917 public:
921 virtual ~ICloneableModelComponent() = default;
922
927 [[nodiscard]] virtual ICloneableModelComponent *parent() const = 0;
928
937 [[nodiscard]] virtual ICloneableModelComponent *clone(const std::unordered_map<std::string, hydrocouple_variant> &clone_optional_arguments = std::unordered_map<std::string, hydrocouple_variant>()) = 0;
938
943 [[nodiscard]] virtual std::vector<ICloneableModelComponent *> clones() const = 0;
944 };
945
954 class IValueDefinition : public virtual IDescription
955 {
956 public:
960 virtual ~IValueDefinition() = default;
961
968 [[nodiscard]] virtual const std::type_info &type() const = 0;
969
971 [[nodiscard]] virtual hydrocouple_variant missingValue() const = 0;
972
974 [[nodiscard]] virtual hydrocouple_variant defaultValue() const = 0;
975 };
976
980 class IDimension : public virtual IIdentity
981 {
982 public:
986 enum class LengthType
987 {
991 Static = 0,
992
996 Dynamic = 1
997 };
998
1002 virtual ~IDimension() = default;
1003
1007 [[nodiscard]] virtual LengthType lengthType() const = 0;
1008 };
1009
1026 class IQuality : public virtual IValueDefinition
1027 {
1028 public:
1032 virtual ~IQuality() = default;
1033
1039 [[nodiscard]] virtual hydrocouple_variant_set categories() const = 0;
1040
1044 [[nodiscard]] virtual bool isOrdered() const = 0;
1045 };
1046
1050 class IUnitDimensions : public virtual IDescription
1051 {
1052 public:
1057 {
1061 Length,
1062
1066 Mass,
1067
1071 Time,
1072
1077
1082
1087
1092
1096 Currency,
1097
1101 Unitless,
1102 };
1103
1107 virtual ~IUnitDimensions() = default;
1108
1134 [[nodiscard]] virtual double power(HydroCouple::IUnitDimensions::FundamentalUnitDimension dimension) = 0;
1135 };
1136
1140 class IUnit : public virtual IDescription
1141 {
1142 public:
1147 {
1148 Standard,
1149 Geographic,
1150 Unknown
1151 };
1152
1156 enum class DistanceUnits
1157 {
1158
1162 Meters,
1163
1167 Kilometers,
1168
1172 Feet,
1173
1178
1182 Yards,
1183
1187 Miles,
1188
1192 Degrees,
1193
1198
1203
1207 Inches,
1208
1212 Unknown
1213 };
1214
1218 enum class AreaUnits
1219 {
1220
1225
1230
1234 SquareFeet,
1235
1240
1245
1249 Hectares,
1250
1254 Acres,
1255
1260
1265
1270
1275
1280
1284 Unknown
1285 };
1286
1290 virtual ~IUnit() = default;
1291
1295 [[nodiscard]] virtual IUnitDimensions *dimensions() const = 0;
1296
1300 [[nodiscard]] virtual double conversionFactorToSI() const = 0;
1301
1305 [[nodiscard]] virtual double offsetToSI() const = 0;
1306 };
1307
1312 class IQuantity : public virtual IValueDefinition
1313 {
1314 public:
1318 virtual ~IQuantity() = default;
1319
1323 [[nodiscard]] virtual IUnit *unit() const = 0;
1324
1329 [[nodiscard]] virtual hydrocouple_variant minValue() const = 0;
1330
1335 [[nodiscard]] virtual hydrocouple_variant maxValue() const = 0;
1336 };
1337
1346 class IComponentDataItem : public virtual IIdentity, public virtual ISignal<const std::shared_ptr<IComponentDataItemValueChanged> &>
1347 {
1348 public:
1352 virtual ~IComponentDataItem() = default;
1353
1363 [[nodiscard]] virtual IModelComponent *modelComponent() const = 0;
1364
1371 [[nodiscard]] virtual std::vector<IDimension *> dimensions() const = 0;
1372
1382 [[nodiscard]] virtual int dimensionLength(std::span<const int>dimensionIndexes = {}) const = 0;
1383
1388 [[nodiscard]] virtual IValueDefinition *valueDefinition() const = 0;
1389
1396 virtual void getValue(
1397 hydrocouple_variant &data,
1398 std::span<const int>dimensionIndexes) const = 0;
1399
1407 virtual void getValues(
1408 hydrocouple_variant *data,
1409 std::span<const int>dimensionIndexes,
1410 std::span<const int>dimensionLengths = {}) const = 0;
1411
1417 virtual void setValue(
1418 const hydrocouple_variant &data,
1419 std::span<const int>dimensionIndexes) = 0;
1420
1428 virtual void setValues(
1429 const hydrocouple_variant *data,
1430 std::span<const int>dimensionIndexes,
1431 std::span<const int>dimensionLengths = {}) = 0;
1432
1437 [[nodiscard]] virtual bool hasEditor() const = 0;
1438
1443 virtual void showEditor(void *opaqueUIPointer = nullptr) = 0;
1444
1449 [[nodiscard]] virtual bool hasViewer() const = 0;
1450
1455 virtual void showViewer(void *opaqueUIPointer = nullptr) = 0;
1456 };
1457
1462 {
1463 public:
1468
1473 [[nodiscard]] virtual IComponentDataItem *componentDataItem() const = 0;
1474
1479 [[nodiscard]] virtual std::vector<int> dimensionIndexes() const = 0;
1480
1485 [[nodiscard]] virtual std::vector<int> dimensionLengths() const = 0;
1486 };
1487
1494 class IArgument : public virtual IComponentDataItem
1495 {
1496
1497 public:
1502 {
1506 String,
1507
1511 File,
1512
1516 JSON,
1517
1521 XML,
1522
1526 URL,
1527
1532 };
1533
1537 virtual ~IArgument() = default;
1538
1545 [[nodiscard]] virtual bool isOptional() const = 0;
1546
1554 [[nodiscard]] virtual bool isReadOnly() const = 0;
1555
1559 [[nodiscard]] virtual std::string toString() const = 0;
1560
1564 virtual void saveData() = 0;
1565
1571 [[nodiscard]] virtual std::vector<std::string> fileFilters() const = 0;
1572
1577 [[nodiscard]] virtual std::vector<const std::type_info *> validComponentDataItemTypes() const = 0;
1578
1584 [[nodiscard]] virtual bool isValidArgType(ArgumentInputType argType) const = 0;
1585
1590 [[nodiscard]] virtual ArgumentInputType currentArgumentInputType() const = 0;
1591
1599 [[nodiscard]] virtual bool initialize(const std::string &value, ArgumentInputType argType, std::string &message) = 0;
1600
1608 [[nodiscard]] virtual bool initialize(const IComponentDataItem &componentDataItem, std::string &message) = 0;
1609 };
1610
1620 {
1621 public:
1626
1630 [[nodiscard]] virtual IExchangeItem *exchangeItem() const = 0;
1631
1635 [[nodiscard]] virtual std::string message() const = 0;
1636 };
1637
1643 class IExchangeItem : public virtual IComponentDataItem
1644 {
1645
1646 public:
1650 virtual ~IExchangeItem() = default;
1651 };
1652
1661 class IOutput : public virtual IExchangeItem
1662 {
1663 public:
1667 virtual ~IOutput() = default;
1668
1680 [[nodiscard]] virtual std::vector<IInput *> consumers() const = 0;
1681
1695 virtual void addConsumer(IInput *consumer) = 0;
1696
1706 [[nodiscard]] virtual bool removeConsumer(IInput *consumer) = 0;
1707
1717 [[nodiscard]] virtual std::vector<IAdaptedOutput *> adaptedOutputs() const = 0;
1718
1731 virtual void addAdaptedOutput(IAdaptedOutput *adaptedOutput) = 0;
1732
1742 [[nodiscard]] virtual bool removeAdaptedOutput(IAdaptedOutput *adaptedOutput) = 0;
1743
1758 virtual void updateValues(const IInput *querySpecifier) = 0;
1759 };
1760
1773 class IAdaptedOutput : public virtual IOutput
1774 {
1775 public:
1779 virtual ~IAdaptedOutput() = default;
1780
1788 [[nodiscard]] virtual IAdaptedOutputFactory *adaptedOutputFactory() const = 0;
1789
1798 [[nodiscard]] virtual std::vector<IArgument *> arguments() const = 0;
1799
1810 virtual void initialize() = 0;
1811
1819 [[nodiscard]] virtual IOutput *adaptee() const = 0;
1820
1832 virtual void refresh() = 0;
1833 };
1834
1843 class IAdaptedOutputFactory : public virtual IIdentity
1844 {
1845 public:
1849 virtual ~IAdaptedOutputFactory() = default;
1850
1862 [[nodiscard]] virtual std::vector<IIdentity *> getAvailableAdaptedOutputIds(const IOutput *provider, const IInput *consumer = nullptr) = 0;
1863
1875 [[nodiscard]] virtual std::unique_ptr<IAdaptedOutput> createAdaptedOutput(IIdentity *adaptedProviderId, IOutput *provider, IInput *consumer = nullptr) = 0;
1876 };
1877
1887 {
1888 public:
1893
1898 };
1899
1906 {
1907 public:
1912
1918 [[nodiscard]] virtual IAdaptedOutputFactoryComponentInfo *componentInfo() const = 0;
1919 };
1920
1924 class IInput : public virtual IExchangeItem
1925 {
1926 public:
1930 virtual ~IInput() = default;
1931
1935 [[nodiscard]] virtual IOutput *provider() const = 0;
1936
1942 [[nodiscard]] virtual bool setProvider(IOutput *provider) = 0;
1943
1950 [[nodiscard]] virtual bool canConsume(IOutput *provider, std::string &message) const = 0;
1951 };
1952
1956 class IMultiInput : public virtual IInput
1957 {
1958 public:
1962 virtual ~IMultiInput() = default;
1963
1967 [[nodiscard]] virtual std::vector<IIdentity *> providerLabels() const = 0;
1968
1974 [[nodiscard]] virtual bool isRequiredProvider(const IIdentity *providerLabel) const = 0;
1975
1980 [[nodiscard]] virtual std::vector<IOutput *> providers() const = 0;
1981
1989 [[nodiscard]] virtual bool canConsume(IOutput *provider, std::string &message, const IIdentity *providerRoleIdentifier = nullptr) const = 0;
1990
1996 [[nodiscard]] virtual bool addProvider(IOutput *provider, const IIdentity *providerRoleIdentifier = nullptr) = 0;
1997
2003 [[nodiscard]] virtual bool removeProvider(IOutput *provider) = 0;
2004 };
2005
2013 {
2014
2015 public:
2020
2024 virtual ~IIdBasedComponentDataItem() = default;
2025
2030 [[nodiscard]] virtual std::vector<std::string> identifiers() const = 0;
2031
2037 [[nodiscard]] virtual IDimension *identifierDimension() const = 0;
2038
2046 virtual void getValue(
2047 hydrocouple_variant &data,
2048 int idIndex,
2049 std::span<const int>dimensionIndexes = {}) const = 0;
2050
2059 virtual void getValues(
2060 hydrocouple_variant *data,
2061 std::span<const int>idIndexes,
2062 std::span<const int>dimensionIndexes = {},
2063 std::span<const int>dimensionLengths = {}) const = 0;
2064
2074 virtual void getValues(
2075 hydrocouple_variant *data,
2076 int idIndex,
2077 std::span<const int>dimensionIndexes = {},
2078 int idIndexLength = 1,
2079 std::span<const int>dimensionLengths = {}) const = 0;
2080
2088 virtual void setValue(
2089 const hydrocouple_variant &data,
2090 int idIndex,
2091 std::span<const int>dimensionIndexes = {}) = 0;
2092
2102 virtual void setValues(
2103 const hydrocouple_variant *data,
2104 std::span<const int>idIndexes,
2105 std::span<const int>dimensionIndexes = {},
2106 std::span<const int>dimensionLengths = {}) = 0;
2107
2117 virtual void setValues(
2118 const hydrocouple_variant *data,
2119 int idIndex,
2120 std::span<const int>dimensionIndexes = {},
2121 int idIndexLength = 1,
2122 std::span<const int>dimensionLengths = {}) = 0;
2123 };
2124
2130 {
2131
2132 public:
2136 virtual ~IWorkflowComponentInfo() = default;
2137
2142 [[nodiscard]] virtual IWorkflowComponent *createComponentInstance() = 0;
2143 };
2144
2151 class IWorkflowComponent : public virtual IIdentity, public virtual ISignal<const std::shared_ptr<IWorkflowComponentStatusChangeEventArgs> &>
2152 {
2153
2154 public:
2160 {
2162 Created,
2168 Updating,
2170 Updated,
2172 Done,
2174 Finishing,
2176 Finished,
2178 Failed
2179 };
2180
2184 virtual ~IWorkflowComponent() = default;
2185
2190 [[nodiscard]] virtual IWorkflowComponentInfo *componentInfo() const = 0;
2191
2196 [[nodiscard]] virtual std::vector<IIdentity *> modelComponentLabels() const = 0;
2197
2203 [[nodiscard]] virtual bool isRequiredModelComponent(const IIdentity *modelComponentLabel) const = 0;
2204
2208 virtual void initialize() = 0;
2209
2213 virtual void update() = 0;
2214
2218 virtual void finish() = 0;
2219
2224 [[nodiscard]] virtual WorkflowStatus status() const = 0;
2225
2230 [[nodiscard]] virtual std::vector<IModelComponent *> modelComponents() const = 0;
2231
2239 [[nodiscard]] virtual bool addModelComponent(IModelComponent *component, const IIdentity *modelRoleIdentifier = nullptr) = 0;
2240
2246 [[nodiscard]] virtual bool removeModelComponent(IModelComponent *component) = 0;
2247 };
2248
2254 {
2255 public:
2260
2265 [[nodiscard]] virtual IWorkflowComponent *workflowComponent() const = 0;
2266
2271 [[nodiscard]] virtual IWorkflowComponent::WorkflowStatus previousStatus() const = 0;
2272
2277 [[nodiscard]] virtual IWorkflowComponent::WorkflowStatus status() const = 0;
2278
2283 [[nodiscard]] virtual std::string message() const = 0;
2284
2289 [[nodiscard]] virtual bool hasProgressMonitor() const = 0;
2290
2295 [[nodiscard]] virtual float percentProgress() const = 0;
2296 };
2297
2298}
2299
2300#endif // HYDROCOUPLE_H
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
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.
An IInput item that can accept values for an IModelComponent.
Definition hydrocouple.h:1925
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.
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...
The IMultiInput class is an IInput class that has multiple outputs supplying data to it.
Definition hydrocouple.h:1957
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: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.
@ AmountOfSubstance
Fundamental dimension for amount of substance.
@ LuminousIntensity
Fundamental dimension for luminous intensity.
@ Temperature
Fundamental dimension for temperature.
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
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.
@ SquareNauticalMiles
Square Nautical Miles.
@ SquareMillimeters
Square Millimeters.
@ SquareKilometers
SquareKilometers.
@ SquareDegrees
Square Degrees.
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