From 28c6b9a2855dd492f848a0b509fa6db24db5ee81 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 11 Apr 2001 04:44:39 +0000 Subject: [PATCH] Modified printOn so that parameters that are not set explicitely by the user are commented out - but still appear. Uses the (now public and pure virtual in the base class eoParameterLoader) method isItThere. --- eo/src/utils/eoParser.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 0191d53f..451da162 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -213,7 +213,7 @@ void eoParser::printOn(ostream& os) const printSectionHeader(os, section); //print every param with its value for (; p != params.end(); ++p) - { + { std::string newSection = p->first; if (newSection != section) @@ -224,6 +224,9 @@ void eoParser::printOn(ostream& os) const eoParam* param = p->second; + if (!isItThere(*param)) // comment out the ones not set by the user + os << "# "; + string str = "--" + param->longName() + "=" + param->getValue(); os.setf(ios_base::left, ios_base::adjustfield);