5#ifndef TABLEAU_HYPER_INTERVAL_HPP
6#define TABLEAU_HYPER_INTERVAL_HPP
11#include <hyperapi/hyperapi.h>
43 std::int32_t microseconds)
noexcept;
111 friend
bool operator!=(const
Interval& a, const
Interval& b) noexcept {
return !(a == b); }
133 friend struct internal::ValueInserter;
142 explicit Interval(hyper_interval_t raw_interval, raw_t)
noexcept;
149 hyper_interval_t getRaw() const noexcept;
152 int32_t getMonthPart() const noexcept;
155 int64_t getMicrosecondPart() const noexcept;
161 hyper_interval_t representation_ = {{0, 0}};
166 hyper_interval_components_t interval_ = {0, 0, 0, 0, 0, 0, 0};
170#include <hyperapi/impl/Interval.impl.hpp>
Interval(std::int32_t years, std::int32_t months, std::int32_t days, std::int32_t hours, std::int32_t minutes, std::int32_t seconds, std::int32_t microseconds) noexcept
Creates an interval value from a number of years, months, days, hours, minutes, seconds,...
std::string toString() const
Gets a string representation for debugging.
Interval() noexcept
Default constructor.
std::int32_t getHours() const noexcept
Gets the number of hours in the interval.
std::int32_t getDays() const noexcept
Gets the number of days in the interval.
std::int32_t getMonths() const noexcept
Gets the number of months in the interval.
std::int32_t getMicroseconds() const noexcept
Gets the number of microseconds in the interval.
std::int32_t getYears() const noexcept
Gets the number of years in the interval.
std::int32_t getMinutes() const noexcept
Gets the number of minutes in the interval.
friend bool operator>=(const Interval &a, const Interval &b) noexcept
Greater or equal operator.
friend bool operator<(const Interval &a, const Interval &b) noexcept
Less than operator.
std::int32_t getSeconds() const noexcept
Gets the number of seconds in the interval.
friend bool operator<=(const Interval &a, const Interval &b) noexcept
Less than or equal operator.
friend std::ostream & operator<<(std::ostream &os, const Interval &obj)
Stream output operator.
The primary namespace of the Hyper API for C++.