14 const std::string ServiceInitialisationType::_labels[
LAST_VALUE] =
15 {
"Not yet initialised",
"File parsing",
"Built-in sample BOM" };
18 const char ServiceInitialisationType::_typeLabels[
LAST_VALUE] =
23 ServiceInitialisationType::ServiceInitialisationType()
29 ServiceInitialisationType::
31 : _type (iServiceInitialisationType._type) {
35 ServiceInitialisationType::
37 : _type (iServiceInitialisationType) {
53 std::ostringstream oMessage;
54 oMessage <<
"The service initialisation type '" << iTypeChar
56 <<
"Known service initialisation types: " << lLabels;
64 ServiceInitialisationType::
65 ServiceInitialisationType (
const char iTypeChar)
66 : _type (getType (iTypeChar)) {
70 ServiceInitialisationType::
71 ServiceInitialisationType (
const std::string& iTypeStr) {
73 const size_t lSize = iTypeStr.size();
75 const char lTypeChar = iTypeStr[0];
82 return _labels[iType];
88 return _typeLabels[iType];
94 std::ostringstream oStr;
95 oStr << _typeLabels[iType];
101 std::ostringstream ostr;
102 for (
unsigned short idx = 0; idx !=
LAST_VALUE; ++idx) {
106 ostr << _labels[idx];
119 const char oTypeChar = _typeLabels[_type];
125 std::ostringstream oStr;
126 oStr << _typeLabels[_type];
132 std::ostringstream ostr;
133 ostr << _labels[_type];
140 return (_type == iType);