From a3a9010e9af1077c5692e4673348f66291fabc77 Mon Sep 17 00:00:00 2001 From: kuepper Date: Tue, 13 Sep 2005 10:24:50 +0000 Subject: [PATCH] setORcreate returns it parameter. --- eo/src/utils/eoParser.h | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index e8ebc0e4..b3fd7e30 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -24,7 +24,7 @@ */ //----------------------------------------------------------------------------- /** -CVS Info: $Date: 2005-09-12 17:53:24 $ $Version$ $Author: kuepper $ +CVS Info: $Date: 2005-09-13 10:24:50 $ $Version$ $Author: kuepper $ */ #ifndef eoParser_h #define eoParser_h @@ -202,11 +202,23 @@ public: If the parameter does not exist yet, it is created. This requires that operator<< is defined for ValueType. + + + @param _defaultValue Default value. + @param _longName Long name of the argument. + @param _description Description of the parameter. + @param _shortName Short name of the argument (Optional) + @param _section Name of the section where the parameter belongs. + @param _required Is the parameter mandatory? + @return Corresponding parameter. */ template - void setORcreateParam(ValueType _defaultValue, std::string _longName, - std::string _description, char _shortHand = 0, - std::string _section = "", bool _required = false) + eoValueParam& setORcreateParam(ValueType _defaultValue, + std::string _longName, + std::string _description, + char _shortHand = 0, + std::string _section = "", + bool _required = false) { eoValueParam& param = createParam(_defaultValue, _longName, _description, _shortHand, _section, _required); @@ -222,6 +234,7 @@ public: longNameMap[_longName] = os.str(); shortNameMap[_shortHand] = os.str(); } + return param; }