-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
return iter->second;
}
+const string & SimpleParser::getTestValue(const string & bmType, const string & protocolStr,
+ const string & key) const throw(ParserException)
+{
+ 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);
+}
+
int SimpleParser::getValueAsInt(const string & key) const throw(ParserException)
{
const string & valueStr = getValue(key);
return res;
}
+int SimpleParser::getTestValueAsInt(const string & bmType, const string & protocolStr,
+ const string & key) const throw(ParserException)
+{
+ 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);
+}
+
ostream & operator <<(ostream & os, const SimpleParser & parser) throw()
{
if (parser._configmap.empty()) {