20#ifndef HYDROCOUPLETEMPORAL_H
21#define HYDROCOUPLETEMPORAL_H
36#if defined(__GNUC__) || defined(__clang__)
37#pragma GCC visibility push(default)
252 [[nodiscard]]
virtual std::span<const double>
times()
const = 0;
328 [[nodiscard]]
virtual std::vector<std::string>
identifiers()
const = 0;
344#if defined(__GNUC__) || defined(__clang__)
345#pragma GCC visibility pop
IComponentDataItem is a fundamental unit of data for a component.
Definition hydrocouple.h:1844
IDimension provides the properties of one axis of a data item's index space.
Definition hydrocouple.h:1494
IModelComponent interface is the core interface in the HydroCouple standard defining a model componen...
Definition hydrocouple.h:696
IPropertyChanged interface is used to emit signal/event when a property of an object changes.
Definition hydrocouple.h:417
IDateTime interface based on a Julian day.
Definition hydrocoupletemporal.h:125
virtual double julianDay() const =0
Date and time as a Julian day value (days since 4713 BC January 1, 12:00 UTC).
virtual double modifiedJulianDay() const =0
Modified Julian day value: julianDay() - 2400000.5 (days since 1858-11-17 00:00 UTC).
virtual double serialDate() const =0
Serial date number in the MATLAB datenum convention: days since 0000-01-00 in the proleptic Gregorian...
virtual ~IDateTime()=default
~IDateTime destructor.
ITimeIdBasedComponentDataItem is an IComponentDataItem with both temporal and identifier-based dimens...
Definition hydrocoupletemporal.h:316
virtual IDimension * identifierDimension() const =0
identifierDimension associated with this data item.
virtual ~ITimeIdBasedComponentDataItem()=default
~ITimeIdBasedComponentDataItem destructor.
virtual std::vector< std::string > identifiers() const =0
identifiers associated with the identifier dimension.
ITimeModelComponent is an IModelComponent that advances through time during simulation and provides a...
Definition hydrocoupletemporal.h:182
virtual ITimeSpan * simulationPeriod() const =0
simulationPeriod of the model.
virtual double nextDateTimeJulianDay() const =0
The time (Julian day) the next update() will advance currentDateTime() to.
virtual IDateTime * currentDateTime() const =0
Gets the current date and time of the model simulation.
virtual ~ITimeModelComponent()=default
ITimeModelComponent destructor.
ITimeSeriesComponentDataItem is an IComponentItem with a temporal attribute.
Definition hydrocoupletemporal.h:223
virtual double intervalLength() const =0
Length of the averaging or accumulation interval (days).
virtual const IDateTime * time(int64_t timeIndex) const =0
Gets the IDateTime for the given time index.
virtual std::span< const double > times() const =0
Bulk access to all time coordinates as Julian day values.
virtual TimeInterpolation timeInterpolation() const =0
What this item does — or, for an input, accepts — between held instants.
virtual ~ITimeSeriesComponentDataItem()=default
~ITimeSeriesComponentDataItem destructor.
virtual TimeExtrapolation timeExtrapolation() const =0
What this item does — or, for an input, accepts — outside its held range.
virtual TimeKind timeKind() const =0
What each value's time coordinate refers to.
virtual IDimension * timeDimension() const =0
Gets the IDimension of the times.
virtual int64_t timeCount() const =0
Gets the number of times.
virtual ITimeSpan * timeSpan() const =0
Gets the ITimeSpan associated with this data item.
ITimeSpan specifies an interval of time.
Definition hydrocoupletemporal.h:157
virtual double duration() const =0
Duration of the timespan in days; non-negative.
virtual double endJulianDay() const =0
End of the interval as a Julian day: julianDay() + duration().
virtual ~ITimeSpan()=default
~ITimeSpan destructor.
Core interface definitions for the HydroCouple component-based modeling framework.
HydroCouple's interfaces that have a time varying component.
Definition hydrocoupletemporal.h:44
TimeExtrapolation
How a provider produces a value at an instant beyond the last (or before the first) it holds.
Definition hydrocoupletemporal.h:110
@ Refuse
A query outside the held range is refused; the provider must be advanced first.
Definition hydrocoupletemporal.h:112
@ HoldLast
Repeat the boundary value.
Definition hydrocoupletemporal.h:113
constexpr double TIME_EQUALITY_TOLERANCE_DAYS
Two instants are the same instant when their Julian days differ by no more than this (1e-8 days,...
Definition hydrocoupletemporal.h:57
constexpr double INTERVAL_LENGTH_CONTIGUOUS
The intervalLength() a time-series item returns when its intervals are contiguous but not of one leng...
Definition hydrocoupletemporal.h:67
TimeKind
What a value's time coordinate refers to.
Definition hydrocoupletemporal.h:85
@ Instantaneous
A reading at the time coordinate.
Definition hydrocoupletemporal.h:87
@ Accumulated
Total accumulated over that interval.
Definition hydrocoupletemporal.h:91
@ IntervalMean
Mean over the interval ending at the time coordinate.
Definition hydrocoupletemporal.h:88
@ Unknown
Not declared.
Definition hydrocoupletemporal.h:86
@ IntervalMaximum
Maximum over that interval.
Definition hydrocoupletemporal.h:90
@ IntervalMinimum
Minimum over that interval.
Definition hydrocoupletemporal.h:89
TimeInterpolation
How a provider produces a value at an instant that is between two it holds.
Definition hydrocoupletemporal.h:98
@ Linear
Linear in time between neighbours.
Definition hydrocoupletemporal.h:103
@ Nearest
The nearer of the two neighbours.
Definition hydrocoupletemporal.h:102
@ None
Exact match required (within TIME_EQUALITY_TOLERANCE_DAYS); a query at an instant not held is refused...
Definition hydrocoupletemporal.h:100
@ Previous
Hold the most recent earlier value (step function).
Definition hydrocoupletemporal.h:101
HydroCouple namespace contains the core interface specifications for the HydroCouple component-based ...
Definition hydrocouple.h:54