concordia-library/concordia/example.cpp
rjawor 0d4bdf12de removed using namespace std
Former-commit-id: dbb5129e1f94d83eca887ada0f89d6bb45250f1e
2015-04-15 14:14:10 +02:00

18 lines
560 B
C++

#include "concordia/example.hpp"
#include <climits>
Example::Example(const std::string & sentence, const SUFFIX_MARKER_TYPE & id)
throw(ConcordiaException):
_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() {
}