5#ifndef TABLEAU_HYPER_TIME_HPP
6#define TABLEAU_HYPER_TIME_HPP
11#include <hyperapi/hyperapi.h>
40 Time(int8_t hour, std::int8_t minute, std::int8_t second, std::int32_t microsecond = 0) noexcept;
47 explicit
Time(hyper_time_t rawTime,
raw_t) noexcept;
87 hyper_time_t
getRaw() const noexcept;
91 friend
bool operator==(const
Time& lhs, const
Time& rhs) noexcept;
95 friend
bool operator>(const
Time& lhs, const
Time& rhs) noexcept;
99 friend
bool operator!=(const
Time& a, const
Time& b) noexcept {
return !(a == b); }
122 friend struct internal::ValueInserter;
127 hyper_time_t representation_ = 0;
130 hyper_time_components_t time_ = {0, 0, 0, 0};
133#include <hyperapi/impl/Time.impl.hpp>
A timestamp data value with an offset to UTC.
Time() noexcept
Default constructor.
std::int8_t getSecond() const noexcept
Gets the second.
std::int32_t getMicrosecond() const noexcept
Gets the microsecond.
friend std::ostream & operator<<(std::ostream &os, const Time &obj)
Stream output operator.
std::int8_t getMinute() const noexcept
Gets the minute.
std::string toString() const
Gets a string representation for debugging.
friend bool operator<(const Time &a, const Time &b) noexcept
Less than operator.
friend bool operator>=(const Time &a, const Time &b) noexcept
Greater or equal operator.
std::int8_t getHour() const noexcept
Gets the hour.
Time(int8_t hour, std::int8_t minute, std::int8_t second, std::int32_t microsecond=0) noexcept
Creates a time value from separate time components.
hyper_time_t getRaw() const noexcept
Gets the raw time value encoded as microseconds since midnight.
friend bool operator<=(const Time &a, const Time &b) noexcept
Less than or equal operator.
Marker struct for the raw timestamp constructor.
The primary namespace of the Hyper API for C++.