|
tempoch-cpp 0.5.5
Header-only C++ wrapper for tempoch
|
#include <tempoch/period.hpp>
Public Member Functions | |
| Period (const T &start, const T &end) | |
| T | start () const |
| T | end () const |
| template<typename Target> | |
| auto | to () const |
| template<typename TargetA, typename TargetB> | |
| auto | to () const |
| template<typename Target> | |
| auto | to_with (const TimeContext &ctx) const |
| template<typename TargetA, typename TargetB> | |
| auto | to_with (const TimeContext &ctx) const |
| template<typename TargetType = qtty::DayTag> | |
| qtty::Quantity< typename qtty::ExtractTag< TargetType >::type > | duration () const |
| template<typename TargetType = qtty::DayTag> | |
| qtty::Quantity< typename qtty::ExtractTag< TargetType >::type > | length () const |
| Returns the length of the period (primary name; duration() is a backward-compat alias). | |
| Period | intersection (const Period &other) const |
| bool | contains (const T &point) const noexcept |
| std::vector< Period< T > > | union_with (const Period< T > &other) const |
| std::vector< Period< T > > | complement_of (const std::vector< Period< T > > &others) const |
| const tempoch_period_mjd_t & | c_inner () const noexcept |
Static Public Member Functions | |
| static Period | from_c (const tempoch_period_mjd_t &c) |
Definition at line 92 of file period.hpp.
|
inline |
Construct a half-open interval [start, end).
The period is half-open: start is included, end is excluded.
| InvalidPeriodError | if start > end. |
Definition at line 102 of file period.hpp.
|
inlinenoexcept |
Definition at line 193 of file period.hpp.
|
inline |
Definition at line 176 of file period.hpp.
|
inlinenoexcept |
Definition at line 160 of file period.hpp.
|
inline |
Definition at line 142 of file period.hpp.
Referenced by tempoch::Period< ModifiedJulianDate< scale::TT > >::length().
|
inline |
Definition at line 111 of file period.hpp.
Referenced by tempoch::operator<<(), tempoch::Period< ModifiedJulianDate< scale::TT > >::to(), and tempoch::Period< ModifiedJulianDate< scale::TT > >::to_with().
|
inlinestatic |
Definition at line 108 of file period.hpp.
Referenced by tempoch::detail::from_alloc(), and tempoch::Period< ModifiedJulianDate< scale::TT > >::intersection().
|
inline |
Definition at line 153 of file period.hpp.
|
inline |
Returns the length of the period (primary name; duration() is a backward-compat alias).
Definition at line 149 of file period.hpp.
|
inline |
Definition at line 110 of file period.hpp.
Referenced by tempoch::operator<<(), tempoch::Period< ModifiedJulianDate< scale::TT > >::to(), and tempoch::Period< ModifiedJulianDate< scale::TT > >::to_with().
|
inline |
Definition at line 120 of file period.hpp.
|
inline |
Definition at line 113 of file period.hpp.
Referenced by tempoch::Period< ModifiedJulianDate< scale::TT > >::duration().
|
inline |
Definition at line 134 of file period.hpp.
|
inline |
Definition at line 127 of file period.hpp.
|
inline |
Definition at line 164 of file period.hpp.