2014-02-20 10:49:17 +01:00
|
|
|
#ifndef EXAMPLE_HDR
|
|
|
|
#define EXAMPLE_HDR
|
|
|
|
|
|
|
|
#include "concordia/common/config.hpp"
|
2014-03-14 11:30:17 +01:00
|
|
|
#include "concordia/concordia_exception.hpp"
|
2014-02-20 10:49:17 +01:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
/*!
|
|
|
|
Class representing a single sentence to be added into index along with its id.
|
2015-05-01 14:52:53 +02:00
|
|
|
For more info see \ref tutorial1_2.
|
2014-02-20 10:49:17 +01:00
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
class Example {
|
|
|
|
public:
|
2015-05-01 14:52:53 +02:00
|
|
|
/*!
|
|
|
|
Constructor.
|
|
|
|
\param sentence sentence to be added to index
|
|
|
|
\param id id of this sentence
|
|
|
|
*/
|
2015-04-15 14:14:10 +02:00
|
|
|
explicit Example(const std::string & sentence,
|
2019-01-18 13:30:51 +01:00
|
|
|
const SUFFIX_MARKER_TYPE & id);
|
2014-02-20 10:49:17 +01:00
|
|
|
|
|
|
|
/*! Destructor.
|
|
|
|
*/
|
|
|
|
virtual ~Example();
|
|
|
|
|
2015-05-01 14:52:53 +02:00
|
|
|
/*! Getter for sentence.
|
|
|
|
\return sentence
|
|
|
|
*/
|
2015-04-15 14:14:10 +02:00
|
|
|
std::string getSentence() const {
|
2014-02-20 10:49:17 +01:00
|
|
|
return _sentence;
|
|
|
|
}
|
|
|
|
|
2015-05-01 14:52:53 +02:00
|
|
|
/*! Getter for sentence id.
|
|
|
|
\return sentence id
|
|
|
|
*/
|
2014-02-20 10:49:17 +01:00
|
|
|
SUFFIX_MARKER_TYPE getId() const {
|
|
|
|
return _id;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
2015-04-15 14:14:10 +02:00
|
|
|
std::string _sentence;
|
2014-02-20 10:49:17 +01:00
|
|
|
|
|
|
|
SUFFIX_MARKER_TYPE _id;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|