diff --git a/eo/src/utils/eoStdoutMonitor.cpp b/eo/src/utils/eoStdoutMonitor.cpp index 95754de44..622a2743e 100644 --- a/eo/src/utils/eoStdoutMonitor.cpp +++ b/eo/src/utils/eoStdoutMonitor.cpp @@ -16,41 +16,43 @@ using namespace std; eoMonitor& eoStdoutMonitor::operator()(void) { - if (!cout) - { - string str = "eoStdoutMonitor: Could not write to cout"; - throw runtime_error(str); + if (!cout) { + string str = "eoStdoutMonitor: Could not write to cout"; + throw runtime_error (str); } - if (firsttime) - { - if (verbose) + + if (firsttime) { + + if (verbose) { eo::log << eo::progress << "First Generation" << endl; - else - { - for(iterator it = vec.begin(); it != vec.end(); ++it) - { - cout << (*it)->longName() << delim; - } - cout << endl; - } - firsttime = false; - } + + } else { // else verbose + for (iterator it = vec.begin (); it != vec.end (); ++it) { + cout << (*it)->longName () << delim; + } + cout << endl; + } // else verbose + + firsttime = false; + } // if firstime + // ok, now the real saving. write out - if (verbose) - { - for(iterator it = vec.begin(); it != vec.end(); ++it) - { - cout << (*it)->longName() << ": " << (*it)->getValue() << endl; - } - eo::log << eo::progress << "End of Generation" << endl; - } - else // a one-liner - { - for(iterator it = vec.begin(); it != vec.end(); ++it) - { - cout << (*it)->getValue() << delim; - } - cout << endl; - } - return *this; + if (verbose) { + for (iterator it = vec.begin (); it != vec.end (); ++it) { + // name: value + cout << (*it)->longName () << ": " << (*it)->getValue () << endl; + } // for it in vec + + eo::log << eo::progress << "End of Generation" << endl; + + } else { // else verbose + for (iterator it = vec.begin (); it != vec.end (); ++it) { + // value only + cout << (*it)->getValue () << delim; + } // for it in vec + + cout << endl; + } // if verbose + + return *this; }