14 const std::string ForecastingMethod::_labels[
LAST_VALUE] =
15 {
"Q Forecasting",
"Hybrid Forecasting",
"Old QFF",
"New QFF",
16 "Based Forecasting" };
19 const char ForecastingMethod::
20 _methodLabels[
LAST_VALUE] = {
'Q',
'H',
'O' ,
'N',
'B'};
24 ForecastingMethod::ForecastingMethod()
32 : _method (iForecastingMethod._method) {
38 : _method (iForecastingMethod) {
42 ForecastingMethod::ForecastingMethod (
const char iMethod) {
46 case 'O': _method =
OLD_QFF;
break;
47 case 'N': _method =
NEW_QFF;
break;
54 std::ostringstream oMessage;
55 oMessage <<
"The forecasting method '" << iMethod
56 <<
"' is not known. Known forecasting methods: " << lLabels;
64 return _labels[iMethod];
69 return _methodLabels[iMethod];
75 std::ostringstream oStr;
76 oStr << _methodLabels[iMethod];
82 std::ostringstream ostr;
83 for (
unsigned short idx = 0; idx !=
LAST_VALUE; ++idx) {
87 ostr << _labels[idx] <<
" (" << _methodLabels[idx] <<
")";
99 std::ostringstream oStr;
100 oStr << _methodLabels[_method];
106 std::ostringstream ostr;
107 ostr << _labels[_method];
114 return (_method == iMethod);