return iter->second;
}
-const string & SimpleParser::getTestValue(const string & bmType, const string & key) const throw(ParserException)
+const string & SimpleParser::getTestValue(const string & bmType, const string & protocolStr,
+ const string & key) const throw(ParserException)
{
- string fullkey = string("TEST_") + bmType + "_" + key;
+ string fullkey = string("TEST_") + bmType + "_" + protocolStr + "_" + key;
+ try {
+ return getValue(fullkey);
+ } catch (const ParserException &) {}
+ fullkey = string("TEST_") + bmType + "_" + key;
+ try {
+ return getValue(fullkey);
+ } catch (const ParserException &) {}
+ fullkey = string("TEST_") + key;
return getValue(fullkey);
}
return res;
}
-int SimpleParser::getTestValueAsInt(const string & bmType, const string & key) const throw(ParserException)
+int SimpleParser::getTestValueAsInt(const string & bmType, const string & protocolStr,
+ const string & key) const throw(ParserException)
{
- string fullkey = string("TEST_") + bmType + "_" + key;
+ string fullkey = string("TEST_") + bmType + "_" + protocolStr + "_" + key;
+ try {
+ return getValueAsInt(fullkey);
+ } catch (const ParserException &) {}
+ fullkey = string("TEST_") + bmType + "_" + key;
+ try {
+ return getValueAsInt(fullkey);
+ } catch (const ParserException &) {}
+ fullkey = string("TEST_") + key;
return getValueAsInt(fullkey);
}