18 : _queryString (iQueryString) {
23 : _queryString (iScoreBoard._queryString),
24 _scoreMap (iScoreBoard._scoreMap) {
30 : _queryString (iQueryString) {
45 ScoreMap_T::const_iterator itScore = _scoreMap.find (lScoreTypeEnum);
46 if (itScore != _scoreMap.end()) {
47 oScore = itScore->second;
76 if (lComparablePct.
AlmostEquals (lCodeFullMatchingPct) ==
true) {
116 if (lComparableValue.
AlmostEquals (lNoEnvelopeIDValue) ==
true) {
126 ScoreMap_T::iterator itScore = _scoreMap.find (lScoreTypeEnum);
128 if (itScore != _scoreMap.end()) {
130 Score_T& lScore = itScore->second;
135 const bool insertSucceeded =
136 _scoreMap.insert (ScoreMap_T::value_type (lScoreTypeEnum,
140 if (insertSucceeded ==
false) {
142 <<
"inserted in the dedicated list for the "
143 << iScoreType.
describe() <<
" score type");
145 assert (insertSucceeded ==
true);
151 std::ostringstream oStr;
152 oStr << _queryString;
158 std::ostringstream oStr;
161 unsigned short idx = 0;
162 for (ScoreMap_T::const_iterator itScore = _scoreMap.begin();
163 itScore != _scoreMap.end(); ++itScore, ++idx) {
168 const Score_T& lScore = itScore->second;
190 for (ScoreMap_T::iterator itScore = _scoreMap.begin();
191 itScore != _scoreMap.end(); ++itScore) {
193 Score_T& lScore = itScore->second;
201 if (isIndividual ==
true) {
202 oPercentage *= lScore / 100.0;
void toStream(std::ostream &) const
Structure holding a board for all the types of score/matching having been performed.
void setCombinedWeight(const Score_T &iScore)
#define OPENTREP_LOG_ERROR(iToBeLogged)
Score_T getScore(const ScoreType &) const
bool isIndividualScore() const
ScoreBoard(const TravelQuery_T &, const ScoreType &, const Score_T &)
Percentage_T calculateCombinedWeight()
std::string describeKey() const
bool AlmostEquals(const FloatingPoint &rhs) const
const Percentage_T K_DEFAULT_MODIFIED_MATCHING_PCT
const Percentage_T K_DEFAULT_ENVELOPE_PCT
std::string describe() const
const Percentage_T K_DEFAULT_FULL_CODE_MATCH_PCT
EN_ScoreType getType() const
static std::string getTypeLabelAsString(const EN_ScoreType &)
Enumeration of score types.
void setScore(const ScoreType &, const Score_T &)
std::string describe() const
std::string TravelQuery_T
void fromStream(std::istream &)