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.
This commit is contained in:
evomarc 2001-04-11 04:44:39 +00:00
commit 28c6b9a285

View file

@ -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);