23 #ifndef NDN_REPETITIVE_INTERVAL_HPP
24 #define NDN_REPETITIVE_INTERVAL_HPP
26 #include "interval.hpp"
48 this->isPositive = isPositive;
49 this->interval = interval;
77 int intervalStartHour,
int intervalEndHour,
int nRepeats = 0,
78 RepeatUnit repeatUnit = RepeatUnit::NONE);
162 static const uint64_t MILLISECONDS_IN_HOUR = 3600 * 1000;
163 static const uint64_t MILLISECONDS_IN_DAY = 24 * 3600 * 1000;
166 int intervalStartHour_;
167 int intervalEndHour_;
169 RepeatUnit repeatUnit_;
An Interval defines a time duration which contains a start timestamp and an end timestamp.
Definition: interval.hpp:36
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:36
Schedule is used to manage the times when a member can access data using two sets of RepetitiveInterv...
Definition: schedule.hpp:43
Result getInterval(MillisecondsSince1970 timePoint) const
Get an interval that covers the time point.
Definition: repetitive-interval.cpp:78
MillisecondsSince1970 getEndDate() const
Get the end date.
Definition: repetitive-interval.hpp:113
int getIntervalStartHour() const
Get the interval start hour.
Definition: repetitive-interval.hpp:120
int compare(const RepetitiveInterval &other) const
Compare this to the other RepetitiveInterval.
Definition: repetitive-interval.cpp:116
int getIntervalEndHour() const
Get the interval end hour.
Definition: repetitive-interval.hpp:127
A RepetitiveInterval is an advanced interval which can repeat and can be used to find a simple Interv...
Definition: repetitive-interval.hpp:35
double MillisecondsSince1970
The calendar time represented as the number of milliseconds since 1/1/1970.
Definition: common.hpp:117
MillisecondsSince1970 getStartDate() const
Get the start date.
Definition: repetitive-interval.hpp:106
RepeatUnit getRepeatUnit() const
Get the repeat unit.
Definition: repetitive-interval.hpp:141
Definition: repetitive-interval.hpp:44
int getNRepeats() const
Get the number of repeats.
Definition: repetitive-interval.hpp:134
RepetitiveInterval()
Create a default RepetitiveInterval with one day duration, non-repeating.
Definition: repetitive-interval.cpp:39