2014-02-20 10:49:17 +01:00
|
|
|
#ifndef SUBSTRING_OCCURENCE_HDR
|
|
|
|
#define SUBSTRING_OCCURENCE_HDR
|
|
|
|
|
|
|
|
#include "concordia/common/config.hpp"
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
/*!
|
|
|
|
Class representing occurence of a searched substring.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
class SubstringOccurence {
|
|
|
|
public:
|
2015-04-14 20:14:30 +02:00
|
|
|
SubstringOccurence();
|
|
|
|
|
2015-04-12 12:06:41 +02:00
|
|
|
explicit SubstringOccurence(const SUFFIX_MARKER_TYPE & marker);
|
2014-02-20 10:49:17 +01:00
|
|
|
|
2015-04-12 12:06:41 +02:00
|
|
|
SubstringOccurence(const SUFFIX_MARKER_TYPE & id,
|
|
|
|
const SUFFIX_MARKER_TYPE & offset,
|
|
|
|
const SUFFIX_MARKER_TYPE & exampleLength);
|
2014-02-20 10:49:17 +01:00
|
|
|
/*! Destructor.
|
|
|
|
*/
|
|
|
|
virtual ~SubstringOccurence();
|
|
|
|
|
|
|
|
SUFFIX_MARKER_TYPE getId() const {
|
|
|
|
return _id;
|
|
|
|
}
|
|
|
|
|
2014-05-15 22:20:31 +02:00
|
|
|
SUFFIX_MARKER_TYPE getOffset() const {
|
2014-02-20 10:49:17 +01:00
|
|
|
return _offset;
|
|
|
|
}
|
|
|
|
|
2015-04-12 12:06:41 +02:00
|
|
|
SUFFIX_MARKER_TYPE getExampleLength() const {
|
|
|
|
return _exampleLength;
|
|
|
|
}
|
2015-04-15 14:14:10 +02:00
|
|
|
|
2015-04-14 20:14:30 +02:00
|
|
|
void enterDataFromMarker(const SUFFIX_MARKER_TYPE & marker);
|
2015-04-12 12:06:41 +02:00
|
|
|
|
2014-02-20 10:49:17 +01:00
|
|
|
private:
|
|
|
|
SUFFIX_MARKER_TYPE _id;
|
|
|
|
|
2014-05-15 22:20:31 +02:00
|
|
|
SUFFIX_MARKER_TYPE _offset;
|
2015-04-12 12:06:41 +02:00
|
|
|
|
2015-04-15 14:14:10 +02:00
|
|
|
// the example
|
2015-04-12 12:06:41 +02:00
|
|
|
SUFFIX_MARKER_TYPE _exampleLength;
|
2014-02-20 10:49:17 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|