2014-02-20 10:49:17 +01:00
|
|
|
#include "concordia/substring_occurence.hpp"
|
2015-04-12 12:06:41 +02:00
|
|
|
#include "concordia/common/utils.hpp"
|
2014-02-20 10:49:17 +01:00
|
|
|
|
2015-04-14 20:14:30 +02:00
|
|
|
SubstringOccurence::SubstringOccurence() {
|
|
|
|
}
|
2014-02-20 10:49:17 +01:00
|
|
|
|
2015-04-12 12:06:41 +02:00
|
|
|
SubstringOccurence::SubstringOccurence(const SUFFIX_MARKER_TYPE & marker) {
|
|
|
|
_id = Utils::getIdFromMarker(marker);
|
|
|
|
_offset = Utils::getOffsetFromMarker(marker);
|
|
|
|
_exampleLength = Utils::getLengthFromMarker(marker);
|
|
|
|
}
|
|
|
|
|
2015-04-14 20:14:30 +02:00
|
|
|
void SubstringOccurence::enterDataFromMarker(const SUFFIX_MARKER_TYPE & marker) {
|
|
|
|
_id = Utils::getIdFromMarker(marker);
|
|
|
|
_offset = Utils::getOffsetFromMarker(marker);
|
|
|
|
_exampleLength = Utils::getLengthFromMarker(marker);
|
|
|
|
}
|
|
|
|
|
2015-04-12 12:06:41 +02:00
|
|
|
|
|
|
|
SubstringOccurence::SubstringOccurence(
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
SubstringOccurence::~SubstringOccurence() {
|
|
|
|
}
|
|
|
|
|