concordia-library/concordia/example.cpp

17 lines
488 B
C++
Raw Permalink Normal View History

#include "concordia/example.hpp"
#include <climits>
2019-01-18 13:30:51 +01:00
Example::Example(const std::string & sentence, const SUFFIX_MARKER_TYPE & id):
_sentence(sentence),
_id(id) {
// check if the example id exceeds space
// reserved for it in the suffix marker
if (id >= SUFFIX_MARKER_TYPE_MAX_VALUE >> 8) {
throw ConcordiaException("Example id too large.");
}
}
Example::~Example() {
}