14 const std::string SampleType::_labels[
LAST_VALUE] =
15 {
"All",
"AllForPartnerships",
"RevenueManagement",
"Inventory",
"Schedule",
16 "RevenueAccounting",
"FareQuote",
"CRS",
"DemandGeneration",
"EventManagement",
20 const char SampleType::
21 _typeLabels[
LAST_VALUE] = {
'A',
'P',
'R',
'I',
'S',
'T',
'F',
'C',
'D',
'E',
'M' };
25 SampleType::SampleType()
32 : _type (iSampleType._type) {
37 : _type (iSampleType) {
41 SampleType::SampleType (
const char iType) {
43 case 'A': _type =
ALL;
break;
44 case 'P': _type =
A4P;
break;
45 case 'R': _type =
RMS;
break;
46 case 'I': _type =
INV;
break;
47 case 'S': _type =
SCH;
break;
48 case 'T': _type =
RAC;
break;
49 case 'F': _type =
FQT;
break;
50 case 'C': _type =
CRS;
break;
51 case 'D': _type =
DEM;
break;
52 case 'E': _type =
EVT;
break;
53 case 'M': _type =
CCM;
break;
59 std::ostringstream oMessage;
60 oMessage <<
"The sample type '" << iType
61 <<
"' is not known. Known sample types: " << lLabels;
68 return _labels[iType];
73 return _typeLabels[iType];
78 std::ostringstream oStr;
79 oStr << _typeLabels[iType];
85 std::ostringstream ostr;
86 for (
unsigned short idx = 0; idx !=
LAST_VALUE; ++idx) {
102 std::ostringstream oStr;
103 oStr << _typeLabels[_type];
109 std::ostringstream ostr;
110 ostr << _labels[_type];
116 return (_type == iType);
static char getTypeLabel(const EN_SampleType &)
std::string getTypeAsString() const
Handle on the StdAir library context.
Enumeration of BOM sample types.
static const std::string & getLabel(const EN_SampleType &)
static std::string describeLabels()
const std::string describe() const
EN_SampleType getType() const
bool operator==(const EN_SampleType &) const
static std::string getTypeLabelAsString(const EN_SampleType &)