From eafaa2d65e1200a5be83a3d6edc2dc101a179b87 Mon Sep 17 00:00:00 2001 From: evomarc Date: Tue, 10 Apr 2001 15:08:09 +0000 Subject: [PATCH] Added the pure virtual isItThere method in base class eoParameterLoader Also made the corresponding isItThere method in eoParser public. This allows one to test if the user did actually input a given parameter and thus not to write it in the output if not - as we want the output of printOn to be "as identical as possible" to the actual user input --- eo/src/utils/eoParser.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/eo/src/utils/eoParser.h b/eo/src/utils/eoParser.h index 7edf8e93..f95956de 100644 --- a/eo/src/utils/eoParser.h +++ b/eo/src/utils/eoParser.h @@ -24,7 +24,7 @@ */ //----------------------------------------------------------------------------- /** -CVS Info: $Date: 2001-03-21 13:35:10 $ $Version$ $Author: jmerelo $ +CVS Info: $Date: 2001-04-10 15:08:09 $ $Version$ $Author: evomarc $ */ #ifndef eoParser_h #define eoParser_h @@ -56,6 +56,11 @@ public : */ virtual void processParam(eoParam& param, std::string section = "") = 0; + /** + * checks if _param has been actually entered + */ + virtual bool isItThere(eoParam& _param) const = 0; + /** * Construct a Param and sets its value. The loader will own the memory thus created * @@ -138,12 +143,16 @@ public: string ProgramName() { return programName; } + /** + * checks if _param has been actually entered by the user + */ + virtual bool isItThere(eoParam& _param) const + { return getValue(_param).first; } + private: void doRegisterParam(eoParam& param) const; - bool isItThere(eoParam& _param) const { return getValue(_param).first; } - std::pair getValue(eoParam& _param) const; void updateParameters() const;