2014-03-11 14:32:10 +01:00
|
|
|
#ifndef INTERVAL_HDR
|
|
|
|
#define INTERVAL_HDR
|
|
|
|
|
2015-04-14 20:14:30 +02:00
|
|
|
#include "concordia/common/config.hpp"
|
|
|
|
|
2014-03-11 14:32:10 +01:00
|
|
|
/*!
|
|
|
|
Class representing word interval.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
class Interval {
|
|
|
|
public:
|
2015-04-15 14:14:10 +02:00
|
|
|
explicit Interval(const SUFFIX_MARKER_TYPE start,
|
|
|
|
const SUFFIX_MARKER_TYPE end);
|
2014-03-11 14:32:10 +01:00
|
|
|
|
|
|
|
/*! Destructor.
|
|
|
|
*/
|
|
|
|
virtual ~Interval();
|
|
|
|
|
2014-04-29 14:46:04 +02:00
|
|
|
bool intersects(Interval & interval);
|
|
|
|
|
2015-04-14 20:14:30 +02:00
|
|
|
SUFFIX_MARKER_TYPE getLength();
|
2014-03-11 14:32:10 +01:00
|
|
|
|
2015-04-14 20:14:30 +02:00
|
|
|
SUFFIX_MARKER_TYPE getStart() const {
|
2014-03-11 14:32:10 +01:00
|
|
|
return _start;
|
|
|
|
}
|
|
|
|
|
2015-04-14 20:14:30 +02:00
|
|
|
SUFFIX_MARKER_TYPE getEnd() const {
|
2014-03-11 14:32:10 +01:00
|
|
|
return _end;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
2015-04-14 20:14:30 +02:00
|
|
|
SUFFIX_MARKER_TYPE _start;
|
2014-04-29 14:46:04 +02:00
|
|
|
|
2015-04-14 20:14:30 +02:00
|
|
|
SUFFIX_MARKER_TYPE _end;
|
2014-03-11 14:32:10 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|