23 #ifndef NDN_INTERVAL_HPP
24 #define NDN_INTERVAL_HPP
27 #include "../common.hpp"
41 class Error :
public std::exception {
43 Error(
const std::string& errorMessage)
throw();
45 virtual ~
Error()
throw();
48 Msg()
const {
return errorMessage_; }
54 const std::string errorMessage_;
81 startTime_ = interval.startTime_;
82 endTime_ = interval.endTime_;
83 isValid_ = interval.isValid_;
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
Interval.Error extends std::exception for errors using Interval methods.
Definition: interval.hpp:41
bool covers(MillisecondsSince1970 timePoint) const
Check if the time point is in this interval.
Definition: interval.cpp:59
bool isEmpty() const
Check if this Interval is empty.
Definition: interval.cpp:152
Interval & unionWith(const Interval &interval)
Set this Interval to the union of this and the other interval.
Definition: interval.cpp:102
bool isValid() const
Check if this Interval is valid.
Definition: interval.hpp:134
Interval & intersectWith(const Interval &interval)
Set this Interval to the intersection of this and the other interval.
Definition: interval.cpp:71
MillisecondsSince1970 getStartTime() const
Get the start time.
Definition: interval.cpp:136
Interval(bool isValid=false)
Create an Interval with the given validity value.
Definition: interval.cpp:41
double MillisecondsSince1970
The calendar time represented as the number of milliseconds since 1/1/1970.
Definition: common.hpp:117
MillisecondsSince1970 getEndTime() const
Get the end time.
Definition: interval.cpp:144
void set(const Interval &interval)
Set this interval to have the same values as the other interval.
Definition: interval.hpp:79