concordia-library/concordia/example.cpp
rjawor 2533fd5b44 extended markers - length, bitwise operators
Former-commit-id: 948a7fc68bf0b2284ce631d877fc13fa3eaa4882
2015-04-09 22:17:19 +02:00

19 lines
575 B
C++

#include "concordia/example.hpp"
#include <climits>
#include <iostream>
Example::Example(const 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() {
}