2019-01-22 14:07:28 +01:00
|
|
|
#include "concordia/substring_occurrence.hpp"
|
2015-04-12 12:06:41 +02:00
|
|
|
#include "concordia/common/utils.hpp"
|
2014-02-20 10:49:17 +01:00
|
|
|
|
2019-01-22 14:07:28 +01:00
|
|
|
SubstringOccurrence::SubstringOccurrence() {
|
2015-04-14 20:14:30 +02:00
|
|
|
}
|
2014-02-20 10:49:17 +01:00
|
|
|
|
2019-01-22 14:07:28 +01:00
|
|
|
SubstringOccurrence::SubstringOccurrence(const SUFFIX_MARKER_TYPE & marker) {
|
2015-04-12 12:06:41 +02:00
|
|
|
_id = Utils::getIdFromMarker(marker);
|
|
|
|
_offset = Utils::getOffsetFromMarker(marker);
|
2015-04-15 14:14:10 +02:00
|
|
|
_exampleLength = Utils::getLengthFromMarker(marker);
|
2015-04-12 12:06:41 +02:00
|
|
|
}
|
|
|
|
|
2019-01-22 14:07:28 +01:00
|
|
|
void SubstringOccurrence::enterDataFromMarker(
|
2015-04-15 14:14:10 +02:00
|
|
|
const SUFFIX_MARKER_TYPE & marker) {
|
2015-04-14 20:14:30 +02:00
|
|
|
_id = Utils::getIdFromMarker(marker);
|
|
|
|
_offset = Utils::getOffsetFromMarker(marker);
|
|
|
|
_exampleLength = Utils::getLengthFromMarker(marker);
|
|
|
|
}
|
|
|
|
|
2015-04-12 12:06:41 +02:00
|
|
|
|
2019-01-22 14:07:28 +01:00
|
|
|
SubstringOccurrence::SubstringOccurrence(
|
2015-04-12 12:06:41 +02:00
|
|
|
const SUFFIX_MARKER_TYPE & id,
|
|
|
|
const SUFFIX_MARKER_TYPE & offset,
|
|
|
|
const SUFFIX_MARKER_TYPE & exampleLength):
|
|
|
|
_id(id),
|
|
|
|
_offset(offset),
|
|
|
|
_exampleLength(exampleLength) {
|
2014-02-20 10:49:17 +01:00
|
|
|
}
|
|
|
|
|
2019-01-22 14:07:28 +01:00
|
|
|
SubstringOccurrence::~SubstringOccurrence() {
|
2014-02-20 10:49:17 +01:00
|
|
|
}
|
|
|
|
|