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:
parent
eafaa2d65e
commit
28c6b9a285
1 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Reference in a new issue