indent clean, more comments

This commit is contained in:
Johann Dreo 2010-09-06 00:04:37 +02:00
commit 236dd02608

View file

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