meos::PeriodSet class

Set of one or more Period objects.

Constructors, destructors, conversion operators

PeriodSet()
PeriodSet(std::set<std::unique_ptr<Period>> const& periods)
PeriodSet(std::set<Period> const& periods)
PeriodSet(std::set<std::string> const& periods)
PeriodSet(PeriodSet const& t)
PeriodSet(std::string const& serialized)

Public functions

auto clone() -> std::unique_ptr<PeriodSet>
auto periods() const -> std::set<Period>
auto period() const -> Period
auto numPeriods() const -> size_t
auto startPeriod() const -> Period
auto endPeriod() const -> Period
auto periodN(size_t n) const -> Period
auto timespan() const -> duration_ms
auto shift(duration_ms const timedelta) const -> std::unique_ptr<PeriodSet>
auto timestamps() const -> std::set<time_point>
auto numTimestamps() const -> size_t
auto startTimestamp() const -> time_point
auto endTimestamp() const -> time_point
auto timestampN(size_t n) const -> time_point

Protected variables

std::set<std::unique_ptr<Period>> m_periods

Friends

auto operator==(PeriodSet const& lhs, PeriodSet const& rhs) -> bool
auto operator!=(PeriodSet const& lhs, PeriodSet const& rhs) -> bool
auto operator<(PeriodSet const& lhs, PeriodSet const& rhs) -> bool
auto operator>(PeriodSet const& lhs, PeriodSet const& rhs) -> bool
auto operator>=(PeriodSet const& lhs, PeriodSet const& rhs) -> bool
auto operator<=(PeriodSet const& lhs, PeriodSet const& rhs) -> bool
auto operator>>(std::istream& in, PeriodSet& period_set) -> std::istream&
auto operator<<(std::ostream& os, PeriodSet const& period_set) -> std::ostream&