added a getParam method to the eoParser, that raise an exception if the parameter has not been declared

This commit is contained in:
nojhan 2012-03-15 18:14:04 +01:00
commit 7e7a47c9ba
2 changed files with 15 additions and 0 deletions

View file

@ -129,6 +129,15 @@ eoParam * eoParser::getParamWithLongName(const std::string& _name) const
return 0;
}
eoParam * getParam(const std::string& _name) const
{
eoParam * p = getParamWithLongName( _name );
if( p == NULL ) {
throw eoMissingParamException(_name );
} else {
return p;
}
}
void eoParser::processParam(eoParam& param, std::string section)
{