indent clean, more comments
This commit is contained in:
parent
b9d74c0b55
commit
236dd02608
1 changed files with 36 additions and 34 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue