19 #ifndef __libtemporal_range_hpp__
20 #define __libtemporal_range_hpp__
85 }
else if (eb == sa) {
90 }
else if (eb == ea) {
96 }
else if (sb == sa) {
99 }
else if (eb == ea) {
107 }
else if (eb == ea) {
112 }
else if (sb == ea) {
120 std::cerr <<
"unknown overlap type!" << sa <<
", " << ea <<
"; " << sb <<
", " << eb << std::endl;
121 assert(!
"unknown overlap type!");
154 bool empty()
const {
return _start == _end; }
171 return other.
_start == _start && other.
_end == _end;
190 void dump (std::ostream& ostr)
const {
191 ostr <<
"Range @ " <<
this <<
' ' << _start <<
" .. " << _end;
223 _list.push_back (range);
227 return _list.empty ();
236 for (
typename List::iterator i = _list.begin(); i != _list.end(); ++i) {
237 for (
typename List::iterator j = _list.begin(); j != _list.end(); ++j) {
244 i->set_start (std::min (i->start(), j->start()));
245 i->set_end (std::max (i->end(), j->end()));
255 void dump (std::ostream& ostr)
const {
256 ostr <<
"RangeList @ " <<
this << std::endl;
257 for (
auto const & r : _list) {
258 ostr << r << std::endl;
void dump(std::ostream &ostr) const
void add(Range const &range)
RangeList subtract(RangeList &) const
Range(timepos_t const &s, timepos_t const &e)
Range(samplepos_t const s, samplepos_t const e)
timepos_t squish(timepos_t const &t) const
void set_end(timepos_t e)
timepos_t _end
end of the range (exclusive, see above)
timepos_t _start
start of the range
void set_start(timepos_t s)
OverlapType coverage(timepos_t const &s, timepos_t const &e) const
void dump(std::ostream &ostr) const
int62_t const & distance() const
PBD::PropertyDescriptor< timecnt_t > length
Temporal::timepos_t timepos_t
OverlapType coverage_exclusive_ends(T sa, T eaE, T sb, T ebE)
OverlapType coverage_inclusive_ends(T sa, T ea, T sb, T eb)
LIBTEMPORAL_TEMPLATE_API OverlapType coverage_exclusive_ends< int64_t >(int64_t sa, int64_t eaE, int64_t sb, int64_t ebE)
bool operator==(const ProcessorSelection &a, const ProcessorSelection &b)
timecnt_t length
length of the range
RangeMove(timepos_t f, timecnt_t l, timepos_t t)
timepos_t to
new start of the range
timepos_t from
start of the range
#define LIBTEMPORAL_TEMPLATE_API