|
tempoch-cpp 0.5.5
Header-only C++ wrapper for tempoch
|
A point in time on scale S, stored as a split J2000-second pair.
More...
#include <tempoch/time_base.hpp>
Public Types | |
| using | scale_type = S |
Public Member Functions | |
| Time () | |
| std::pair< qtty::Second, qtty::Second > | split_seconds () const noexcept |
| qtty::Second | total_seconds () const noexcept |
| const tempoch_time_t & | c_inner () const noexcept |
| template<typename U = S, std::enable_if_t< std::is_same_v< U, scale::UTC >, int > = 0> | |
| CivilTime | to_civil () const |
| template<typename U = S, std::enable_if_t< std::is_same_v< U, scale::UTC >, int > = 0> | |
| CivilTime | to_civil (const TimeContext &ctx) const |
| template<typename TargetScale, std::enable_if_t< is_scale_v< TargetScale > &&!std::is_same_v< S, scale::UT1 > &&!std::is_same_v< TargetScale, scale::UT1 >, int > = 0> | |
| Time< TargetScale > | to () const |
| template<typename TargetScale, std::enable_if_t< is_scale_v< TargetScale > &&(std::is_same_v< S, scale::UT1 >||std::is_same_v< TargetScale, scale::UT1 >), int > = 0> | |
| Time< TargetScale > | to () const =delete |
| template<typename TargetScale, std::enable_if_t< is_scale_v< TargetScale >, int > = 0> | |
| Time< TargetScale > | to_with (const TimeContext &ctx) const |
| template<typename TargetScale, typename TargetFormat, std::enable_if_t< is_scale_v< TargetScale > &&is_format_v< TargetFormat >, int > = 0> | |
| EncodedTime< TargetScale, TargetFormat > | to () const |
| template<typename TargetScale, typename TargetFormat, std::enable_if_t< is_scale_v< TargetScale > &&is_format_v< TargetFormat >, int > = 0> | |
| EncodedTime< TargetScale, TargetFormat > | to_with (const TimeContext &ctx) const |
| template<typename TargetFormat, std::enable_if_t< is_format_v< TargetFormat >, int > = 0> | |
| EncodedTime< S, TargetFormat > | to () const |
| template<typename TargetFormat, std::enable_if_t< is_format_v< TargetFormat >, int > = 0> | |
| EncodedTime< S, TargetFormat > | to_with (const TimeContext &ctx) const |
| template<typename TargetScale, std::enable_if_t< is_scale_v< TargetScale >, int > = 0> | |
| std::optional< Time< TargetScale > > | try_to () const |
| template<typename TargetFormat, std::enable_if_t< is_format_v< TargetFormat >, int > = 0> | |
| std::optional< EncodedTime< S, TargetFormat > > | try_to () const |
| template<typename Q> | |
| Time | operator+ (const Q &delta) const |
| template<typename Q> | |
| Time | operator- (const Q &delta) const |
| template<typename Q> | |
| Time & | operator+= (const Q &delta) |
| template<typename Q> | |
| Time & | operator-= (const Q &delta) |
| qtty::Second | operator- (const Time &other) const |
| bool | operator== (const Time &other) const noexcept |
| bool | operator!= (const Time &other) const noexcept |
| bool | operator< (const Time &other) const noexcept |
| bool | operator<= (const Time &other) const noexcept |
| bool | operator> (const Time &other) const noexcept |
| bool | operator>= (const Time &other) const noexcept |
Static Public Member Functions | |
| static Time | from_split_seconds (qtty::Second hi, qtty::Second lo=qtty::Second(0.0)) |
| static Time | from_raw_j2000_seconds (qtty::Second seconds) |
| template<typename Fmt> | |
| static Time | from_encoded (const EncodedTime< S, Fmt > &encoded) |
Decode a scalar encoding Fmt into canonical split storage on scale S (default context). | |
| template<typename Fmt> | |
| static Time | from_encoded_with (const EncodedTime< S, Fmt > &encoded, const TimeContext &ctx) |
Decode using explicit UTC / UT1 policy from ctx when required by format Fmt. | |
| static constexpr const char * | label () |
| template<typename U = S, std::enable_if_t< std::is_same_v< U, scale::UTC >, int > = 0> | |
| static Time | from_civil (const CivilTime &civil) |
| template<typename U = S, std::enable_if_t< std::is_same_v< U, scale::UTC >, int > = 0> | |
| static Time | from_civil (const CivilTime &civil, const TimeContext &ctx) |
Friends | |
| template<typename> | |
| class | Time |
| template<typename, typename> | |
| class | EncodedTime |
A point in time on scale S, stored as a split J2000-second pair.
Definition at line 144 of file time_base.hpp.
| using tempoch::Time< S >::scale_type = S |
Definition at line 155 of file time_base.hpp.
|
inline |
Definition at line 157 of file time_base.hpp.
|
inlinenoexcept |
Definition at line 184 of file time_base.hpp.
Referenced by tempoch::to_gnss_week().
|
inlinestatic |
Definition at line 189 of file time_base.hpp.
References Time, and tempoch::detail::time_from_civil().
Referenced by tempoch::detail::convert_period_endpoint(), tempoch::detail::convert_period_endpoint_with(), tempoch::EncodedTime< S, format::JD >::from_utc(), tempoch::EncodedTime< S, format::JD >::from_utc(), and tempoch::TimeTraits< CivilTime >::to_mjd_value().
|
inlinestatic |
Definition at line 194 of file time_base.hpp.
References tempoch::TimeContext::get(), Time, and tempoch::detail::time_from_civil().
|
inlinestatic |
Decode a scalar encoding Fmt into canonical split storage on scale S (default context).
Definition at line 166 of file time_base.hpp.
References tempoch::detail::decode_time(), EncodedTime, Time, and tempoch::EncodedTime< S, F >::value().
Referenced by tempoch::TimeTraits< CivilTime >::from_mjd_value(), tempoch::TimeTraits< Time< S > >::from_mjd_value(), tempoch::EncodedTime< S, format::JD >::operator+(), tempoch::EncodedTime< S, format::JD >::operator-(), tempoch::EncodedTime< S, format::JD >::operator-(), tempoch::EncodedTime< S, format::JD >::to(), tempoch::TimeTraits< EncodedTime< S, F > >::to_mjd_value(), and tempoch::EncodedTime< S, format::JD >::to_utc().
|
inlinestatic |
Decode using explicit UTC / UT1 policy from ctx when required by format Fmt.
Definition at line 172 of file time_base.hpp.
References tempoch::detail::decode_time(), EncodedTime, tempoch::TimeContext::get(), Time, and tempoch::EncodedTime< S, F >::value().
Referenced by tempoch::EncodedTime< S, format::JD >::to_utc(), and tempoch::EncodedTime< S, format::JD >::to_with().
|
inlinestatic |
Definition at line 163 of file time_base.hpp.
References from_split_seconds(), and Time.
|
inlinestatic |
Definition at line 159 of file time_base.hpp.
References tempoch::detail::make_time(), and Time.
Referenced by tempoch::from_gnss_week(), and from_raw_j2000_seconds().
|
inlinestaticconstexpr |
Definition at line 186 of file time_base.hpp.
|
inlinenoexcept |
Definition at line 293 of file time_base.hpp.
References Time.
|
inline |
Definition at line 269 of file time_base.hpp.
References tempoch::detail::add_seconds(), and Time.
|
inline |
Definition at line 275 of file time_base.hpp.
References tempoch::detail::add_seconds(), and Time.
|
inline |
Definition at line 273 of file time_base.hpp.
References Time.
|
inline |
Definition at line 285 of file time_base.hpp.
References tempoch::detail::difference_seconds(), and Time.
|
inline |
Definition at line 280 of file time_base.hpp.
References tempoch::detail::add_seconds(), and Time.
|
inlinenoexcept |
Definition at line 295 of file time_base.hpp.
References Time.
|
inlinenoexcept |
Definition at line 300 of file time_base.hpp.
References Time.
|
inlinenoexcept |
Definition at line 289 of file time_base.hpp.
References Time.
|
inlinenoexcept |
Definition at line 301 of file time_base.hpp.
References Time.
|
inlinenoexcept |
Definition at line 302 of file time_base.hpp.
References Time.
|
inlinenoexcept |
Definition at line 176 of file time_base.hpp.
|
inline |
Definition at line 240 of file time_base.hpp.
References tempoch::detail::encode_time(), EncodedTime, and tempoch::detail::quantity_from_raw().
|
inline |
Definition at line 229 of file time_base.hpp.
References EncodedTime, and to().
|
inline |
Definition at line 212 of file time_base.hpp.
References tempoch::detail::scale_convert(), and Time.
Referenced by to().
|
delete |
References Time.
|
inline |
Definition at line 199 of file time_base.hpp.
References tempoch::detail::time_to_civil().
Referenced by tempoch::TimeTraits< CivilTime >::from_mjd_value(), and tempoch::EncodedTime< S, format::JD >::to_utc().
|
inline |
Definition at line 204 of file time_base.hpp.
References tempoch::TimeContext::get(), and tempoch::detail::time_to_civil().
|
inline |
Definition at line 246 of file time_base.hpp.
References tempoch::detail::encode_time(), EncodedTime, tempoch::TimeContext::get(), and tempoch::detail::quantity_from_raw().
|
inline |
Definition at line 235 of file time_base.hpp.
References EncodedTime, and to_with().
|
inline |
Definition at line 223 of file time_base.hpp.
References tempoch::TimeContext::get(), tempoch::detail::scale_convert(), and Time.
|
inlinenoexcept |
Definition at line 180 of file time_base.hpp.
Referenced by tempoch::operator<<().
|
inline |
Definition at line 261 of file time_base.hpp.
References to_with().
|
inline |
Definition at line 252 of file time_base.hpp.
References to_with().
|
friend |
Definition at line 152 of file time_base.hpp.
References EncodedTime.
Referenced by EncodedTime, from_encoded(), from_encoded_with(), to(), and to_with().
|
friend |
Definition at line 151 of file time_base.hpp.
References Time.
Referenced by from_civil(), from_civil(), from_encoded(), from_encoded_with(), from_raw_j2000_seconds(), from_split_seconds(), operator!=(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator<(), operator<=(), operator==(), operator>(), operator>=(), Time, to(), to(), and to_with().