|
tempoch-cpp 0.5.5
Header-only C++ wrapper for tempoch
|
A typed external encoding of a time instant on scale S.
More...
#include <tempoch/time_base.hpp>
Public Types | |
| using | scale_type = S |
| using | format_type = F |
| using | quantity_type = typename FormatTraits<F>::quantity_type |
Public Member Functions | |
| EncodedTime () | |
| EncodedTime (quantity_type raw) | |
| EncodedTime (double value) | |
| quantity_type | raw () const noexcept |
| quantity_type | quantity () const noexcept |
| double | value () const noexcept |
| template<typename TargetScale, std::enable_if_t< is_scale_v< TargetScale >, int > = 0> | |
| auto | 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 () const |
| 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_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> | |
| EncodedTime | operator+ (const Q &delta) const |
| template<typename Q> | |
| EncodedTime | operator- (const Q &delta) const |
| template<typename Q> | |
| EncodedTime & | operator+= (const Q &delta) |
| template<typename Q> | |
| EncodedTime & | operator-= (const Q &delta) |
| quantity_type | operator- (const EncodedTime &other) const |
| bool | operator== (const EncodedTime &other) const noexcept |
| bool | operator!= (const EncodedTime &other) const noexcept |
| bool | operator< (const EncodedTime &other) const noexcept |
| bool | operator<= (const EncodedTime &other) const noexcept |
| bool | operator> (const EncodedTime &other) const noexcept |
| bool | operator>= (const EncodedTime &other) const noexcept |
| EncodedTime | min (const EncodedTime &other) const noexcept |
| EncodedTime | max (const EncodedTime &other) const noexcept |
| EncodedTime | mean (const EncodedTime &other) const |
| template<typename U = F, std::enable_if_t< std::is_same_v< U, format::JD >, int > = 0> | |
| double | jd_value () const noexcept |
| template<typename U = F, std::enable_if_t< std::is_same_v< U, format::MJD >, int > = 0> | |
| double | mjd_value () const noexcept |
| template<typename U = F, std::enable_if_t< std::is_same_v< U, format::JD >, int > = 0> | |
| qtty::JulianCentury | julian_centuries_qty () const noexcept |
| template<typename U = F, std::enable_if_t< std::is_same_v< U, format::JD >, int > = 0> | |
| double | julian_centuries () const noexcept |
| template<typename U = F, std::enable_if_t< std::is_same_v< U, format::JD >, int > = 0> | |
| EncodedTime< S, format::MJD > | to_mjd () const |
| template<typename U = F, std::enable_if_t< std::is_same_v< U, format::MJD >, int > = 0> | |
| EncodedTime< S, format::JD > | to_jd () const |
| template<typename U = S, std::enable_if_t< std::is_same_v< U, scale::TT >, int > = 0> | |
| CivilTime | to_utc () const |
| template<typename U = S, std::enable_if_t< std::is_same_v< U, scale::TT >, int > = 0> | |
| CivilTime | to_utc (const TimeContext &ctx) const |
Static Public Member Functions | |
| static std::optional< EncodedTime > | try_new (quantity_type raw) |
| static EncodedTime | from_raw (quantity_type raw) |
| template<typename U = F, std::enable_if_t< std::is_same_v< U, format::JD >, int > = 0> | |
| static EncodedTime | J2000 () |
| template<typename U = F, std::enable_if_t< std::is_same_v< U, format::JD >, int > = 0> | |
| static EncodedTime | from_mjd (const EncodedTime< S, format::MJD > &mjd) |
| template<typename U = F, std::enable_if_t< std::is_same_v< U, format::MJD >, int > = 0> | |
| static EncodedTime | from_jd (const EncodedTime< S, format::JD > &jd) |
| template<typename U = S, std::enable_if_t< std::is_same_v< U, scale::TT >, int > = 0> | |
| static EncodedTime | from_utc (const CivilTime &civil) |
| template<typename U = S, std::enable_if_t< std::is_same_v< U, scale::TT >, int > = 0> | |
| static EncodedTime | from_utc (const CivilTime &civil, const TimeContext &ctx) |
A typed external encoding of a time instant on scale S.
Definition at line 312 of file time_base.hpp.
| using tempoch::EncodedTime< S, F >::format_type = F |
Definition at line 318 of file time_base.hpp.
| using tempoch::EncodedTime< S, F >::quantity_type = typename FormatTraits<F>::quantity_type |
Definition at line 319 of file time_base.hpp.
| using tempoch::EncodedTime< S, F >::scale_type = S |
Definition at line 317 of file time_base.hpp.
|
inline |
Definition at line 325 of file time_base.hpp.
Referenced by tempoch::EncodedTime< S, format::JD >::from_raw(), tempoch::EncodedTime< S, format::JD >::J2000(), tempoch::EncodedTime< S, format::JD >::mean(), and tempoch::EncodedTime< S, format::JD >::try_new().
|
inlineexplicit |
Definition at line 327 of file time_base.hpp.
|
inlineexplicit |
Definition at line 331 of file time_base.hpp.
|
inlinestatic |
Definition at line 480 of file time_base.hpp.
|
inlinestatic |
Definition at line 475 of file time_base.hpp.
|
inlinestatic |
Construct directly from a quantity, validating that the value is finite.
Unlike try_new, this throws TempochException on non-finite input.
Definition at line 342 of file time_base.hpp.
|
inlinestatic |
Definition at line 485 of file time_base.hpp.
|
inlinestatic |
Definition at line 490 of file time_base.hpp.
|
inlinestatic |
Definition at line 349 of file time_base.hpp.
|
inlinenoexcept |
Definition at line 445 of file time_base.hpp.
|
inlinenoexcept |
Definition at line 460 of file time_base.hpp.
|
inlinenoexcept |
Definition at line 455 of file time_base.hpp.
Referenced by tempoch::EncodedTime< S, format::JD >::julian_centuries().
|
inlinenoexcept |
Definition at line 436 of file time_base.hpp.
|
inline |
Definition at line 440 of file time_base.hpp.
|
inlinenoexcept |
Definition at line 433 of file time_base.hpp.
|
inlinenoexcept |
Definition at line 450 of file time_base.hpp.
|
inlinenoexcept |
Definition at line 427 of file time_base.hpp.
|
inline |
Definition at line 403 of file time_base.hpp.
|
inline |
Definition at line 411 of file time_base.hpp.
|
inline |
Definition at line 421 of file time_base.hpp.
|
inline |
Definition at line 407 of file time_base.hpp.
|
inline |
Definition at line 416 of file time_base.hpp.
|
inlinenoexcept |
Definition at line 428 of file time_base.hpp.
|
inlinenoexcept |
Definition at line 429 of file time_base.hpp.
|
inlinenoexcept |
Definition at line 426 of file time_base.hpp.
|
inlinenoexcept |
Definition at line 430 of file time_base.hpp.
|
inlinenoexcept |
Definition at line 431 of file time_base.hpp.
|
inlinenoexcept |
Definition at line 345 of file time_base.hpp.
|
inlinenoexcept |
Definition at line 344 of file time_base.hpp.
Referenced by tempoch::operator<<().
|
inline |
Definition at line 376 of file time_base.hpp.
|
inline |
Definition at line 360 of file time_base.hpp.
|
inline |
Definition at line 354 of file time_base.hpp.
Referenced by tempoch::EncodedTime< S, format::JD >::from_jd(), tempoch::EncodedTime< S, format::JD >::from_mjd(), tempoch::EncodedTime< S, format::JD >::from_utc(), tempoch::EncodedTime< S, format::JD >::from_utc(), tempoch::EncodedTime< S, format::JD >::operator+(), tempoch::EncodedTime< S, format::JD >::operator-(), tempoch::EncodedTime< S, format::JD >::operator-(), tempoch::EncodedTime< S, format::JD >::to_jd(), tempoch::EncodedTime< S, format::JD >::to_mjd(), and tempoch::EncodedTime< S, format::JD >::to_utc().
|
inline |
Definition at line 470 of file time_base.hpp.
|
inline |
Definition at line 465 of file time_base.hpp.
|
inline |
Definition at line 495 of file time_base.hpp.
|
inline |
Definition at line 500 of file time_base.hpp.
|
inline |
Definition at line 381 of file time_base.hpp.
|
inline |
Definition at line 371 of file time_base.hpp.
|
inline |
Definition at line 365 of file time_base.hpp.
Referenced by tempoch::EncodedTime< S, format::JD >::to_with(), and tempoch::EncodedTime< S, format::JD >::try_to().
|
inlinestatic |
Definition at line 333 of file time_base.hpp.
|
inline |
Definition at line 395 of file time_base.hpp.
|
inline |
Definition at line 386 of file time_base.hpp.
|
inlinenoexcept |
Definition at line 346 of file time_base.hpp.
Referenced by tempoch::Time< S >::from_encoded(), tempoch::Time< S >::from_encoded_with(), and tempoch::TimeTraits< EncodedTime< S, F > >::to_mjd_value().