#include <meos/types/temporal/Temporal.hpp>
template<typename BaseType = float>
Temporal class
Base for all the temporal types - TInstant, TInstantSet, TSequence, TSequenceSet.
Contents
This is a template class and takes in a BaseType as the template parameter. BaseType can be bool, int, float, string or GeomPoint.
When the BaseType is GeomPoint, we add additional support for SRIDs. We do this by conditionally inheriting from SRIDMembers.
Derived classes
-
template<typename BaseType>class TInstant
- A value at a particular instant in time.
Constructors, destructors, conversion operators
Public functions
- auto clone() const -> std::unique_ptr<Temporal<BaseType>>
- auto compare(Temporal const& other) const -> int pure virtual
- auto duration() const -> TemporalDuration virtual
- Duration of the temporal value, that is, one of Instant, InstantSet, Sequence, or SequenceSet.
- auto getValues() const -> std::set<Range<BaseType>> pure virtual
- Set of values taken by the temporal value.
- auto minValue() const -> BaseType
- Minimum value, irrespective of whether the bounds are inclusive or not.
- auto maxValue() const -> BaseType
- Maximum value, irrespective of whether the bounds are inclusive or not.
- auto getTime() const -> PeriodSet pure virtual
- Period set on which the temporal value is defined.
-
auto timespan() const -> duration_
ms pure virtual - Interval on which the temporal value is defined.
- auto period() const -> Period pure virtual
- Period on which the temporal value is defined ignoring potential time gaps.
- auto instants() const -> std::set<Temporal>
- Set of instants.
- auto numTimestamps() const -> size_t
- Number of distinct timestamps.
-
auto startTimestamp() const -> time_
point - Start timestamp.
-
auto endTimestamp() const -> time_
point - End timestamp.
-
auto timestampN(size_t n) const -> time_
point - N-th timestamp.
-
auto timestamps() const -> std::set<time_
point> pure virtual - Set of timestamps.
-
auto shift(duration_
ms const timedelta) const -> std::unique_ptr<Temporal<BaseType>> - Shift the temporal value by a time interval.
-
auto intersectsTimestamp(time_
point const datetime) const -> bool pure virtual - Does the temporal value intersect the timestamp?
- auto intersectsTimestampSet(TimestampSet const timestampset) const -> bool
- Does the temporal value intersect the timestamp set?
- auto intersectsPeriod(Period const period) const -> bool pure virtual
- Does the temporal value intersect the period?
- auto intersectsPeriodSet(PeriodSet const periodset) const -> bool
- Does the temporal value intersect the period set?
Private functions
- auto clone_impl() const -> Temporal<BaseType>* pure virtual
-
auto shift_impl(duration_
ms const timedelta) const -> Temporal<BaseType>* pure virtual
Function documentation
template<typename BaseType>
TemporalDuration meos:: Temporal<BaseType>:: duration() const virtual
Duration of the temporal value, that is, one of Instant, InstantSet, Sequence, or SequenceSet.
Returns | The temporal duration of the current object. |
---|