14 const std::string ScoreType::_labels[
LAST_VALUE] =
15 {
"Combination",
"Xapian Percentage",
"Page Rank",
"Passenger Number",
16 "Heuristic",
"Envelope ID",
"IATA/ICAO Code Full Match"};
18 const char ScoreType::_typeLabels[
LAST_VALUE] = {
'C',
'X',
'R',
'N',
'H',
24 : _type (iScoreType) {
33 case 'N': _type =
PAX_NB;
break;
35 case 'E': _type =
ENV_ID;
break;
42 std::ostringstream oMessage;
43 oMessage <<
"The score type '" << iType
44 <<
"' is not known. Known score types: " << lLabels;
51 return _labels[_type];
56 return _labels[iType];
61 return _typeLabels[iType];
67 std::ostringstream oStr;
68 oStr << _typeLabels[iType];
74 std::ostringstream ostr;
75 for (
unsigned short idx = 0; idx !=
LAST_VALUE; ++idx) {
91 std::ostringstream oStr;
92 oStr << _typeLabels[_type];
98 std::ostringstream ostr;
99 ostr << _labels[_type];
105 bool oIsIndividual =
true;
107 oIsIndividual =
false;
109 return oIsIndividual;
120 return (_type == iType);
static char getTypeLabel(const EN_ScoreType &)
bool isIndividualScore() const
static std::string describeLabels()
std::string describe() const
EN_ScoreType getType() const
std::string getTypeAsString() const
static std::string getTypeLabelAsString(const EN_ScoreType &)
Enumeration of score types.
const std::string & getLongLabel() const
bool operator==(const EN_ScoreType &) const
ScoreType(const EN_ScoreType &)
static const std::string & getLabel(const EN_ScoreType &)