diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 68f59323..009fd402 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -125,7 +125,7 @@ eoParam* eoParser::getParamWithLongName(std::string _name) typedef MultiMapType::const_iterator It; for (It p = params.begin(); p != params.end(); ++p) { - if (p->second->longName() == _name) + if (p->second->longName() == prefix+_name) return p->second; } return 0; @@ -161,6 +161,13 @@ eoValueParam& eoParser::getORcreateParam ( void eoParser::processParam(eoParam& param, std::string section) { + // this param enters the parser: add the prefix to the long name + if (prefix != "") + { + param.setLongName(prefix+param.longName()); + section = prefix + section; // and to section + } + doRegisterParam(param); // plainly register it params.insert(make_pair(section, ¶m)); } diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index 5c1f07a3..e783e62a 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -24,7 +24,7 @@ */ //----------------------------------------------------------------------------- /** -CVS Info: $Date: 2003-02-27 19:21:17 $ $Version$ $Author: okoenig $ +CVS Info: $Date: 2004-04-05 15:28:12 $ $Version$ $Author: evomarc $ */ #ifndef eoParser_h #define eoParser_h @@ -189,6 +189,12 @@ public: void setStopOnUnknownParam(bool _b) {stopOnUnknownParam.value()=_b;} bool getStopOnUnknownParam() {return stopOnUnknownParam.value();} + /** Prefix handling */ + void setPrefix(const std:: string & _prefix) {prefix = _prefix;} + + void resetPrefix() {prefix = "";} + + std::string getPrefix() {return prefix;} private: @@ -216,6 +222,9 @@ private: eoValueParam stopOnUnknownParam; mutable std::vector messages; + + std::string prefix; // used for all created params - in processParam + };