T from;
T to;
+ T duration () const {
+ return to - from;
+ }
+
TimePeriod<T> operator+ (T const & o) const {
return TimePeriod<T> (from + o, to + o);
}
return (from <= other && other < to);
}
- bool operator== (TimePeriod<T> const & other) {
+ bool operator== (TimePeriod<T> const & other) const {
return from == other.from && to == other.to;
}
};
ContentTime max (ContentTime a, ContentTime b);
std::ostream& operator<< (std::ostream& s, ContentTime t);
std::ostream& operator<< (std::ostream& s, DCPTime t);
+std::ostream& operator<< (std::ostream& s, DCPTimePeriod p);
#endif