class
#include <meos/types/time/Period.hpp>
Period Time interval with either inclusive or exlusive bounds.
Contents
- Empty periods are not allowed.
- Periods with lower == upper are called instant periods.
- Instant periods can only have inclusive bounds.
Constructors, destructors, conversion operators
- Period()
-
Period(time_
point const lower, time_ point const upper, bool const lower_inc = true, bool const upper_inc = false) - Period(std::string const& lower, std::string const& upper, bool const lower_inc = true, bool const upper_inc = false)
- Period(std::string const& serialized)
Public functions
- auto clone() -> std::unique_ptr<Period>
-
auto lower() const -> time_
point -
auto upper() const -> time_
point - auto lower_inc() const -> bool
- auto upper_inc() const -> bool
-
auto timespan() const -> duration_
ms -
auto shift(duration_
ms const timedelta) const -> std::unique_ptr<Period> - auto overlap(Period const& period) const -> bool
-
auto contains_timestamp(time_
point const timestamp) const -> bool
Friends
- auto operator==(Period const& lhs, Period const& rhs) -> bool
- auto operator!=(Period const& lhs, Period const& rhs) -> bool
- auto operator<(Period const& lhs, Period const& rhs) -> bool
- auto operator>(Period const& lhs, Period const& rhs) -> bool
- auto operator>=(Period const& lhs, Period const& rhs) -> bool
- auto operator<=(Period const& lhs, Period const& rhs) -> bool
- auto operator>>(std::istream& in, Period& period) -> std::istream&
- auto operator<<(std::ostream& os, Period const& period) -> std::ostream&