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)
|
eoMonitor& eoStdoutMonitor::operator()(void)
|
||||||
{
|
{
|
||||||
if (!cout)
|
if (!cout) {
|
||||||
{
|
string str = "eoStdoutMonitor: Could not write to cout";
|
||||||
string str = "eoStdoutMonitor: Could not write to cout";
|
throw runtime_error (str);
|
||||||
throw runtime_error(str);
|
|
||||||
}
|
}
|
||||||
if (firsttime)
|
|
||||||
{
|
if (firsttime) {
|
||||||
if (verbose)
|
|
||||||
|
if (verbose) {
|
||||||
eo::log << eo::progress << "First Generation" << endl;
|
eo::log << eo::progress << "First Generation" << endl;
|
||||||
else
|
|
||||||
{
|
} else { // else verbose
|
||||||
for(iterator it = vec.begin(); it != vec.end(); ++it)
|
for (iterator it = vec.begin (); it != vec.end (); ++it) {
|
||||||
{
|
cout << (*it)->longName () << delim;
|
||||||
cout << (*it)->longName() << delim;
|
}
|
||||||
}
|
cout << endl;
|
||||||
cout << endl;
|
} // else verbose
|
||||||
}
|
|
||||||
firsttime = false;
|
firsttime = false;
|
||||||
}
|
} // if firstime
|
||||||
|
|
||||||
// ok, now the real saving. write out
|
// ok, now the real saving. write out
|
||||||
if (verbose)
|
if (verbose) {
|
||||||
{
|
for (iterator it = vec.begin (); it != vec.end (); ++it) {
|
||||||
for(iterator it = vec.begin(); it != vec.end(); ++it)
|
// name: value
|
||||||
{
|
cout << (*it)->longName () << ": " << (*it)->getValue () << endl;
|
||||||
cout << (*it)->longName() << ": " << (*it)->getValue() << endl;
|
} // for it in vec
|
||||||
}
|
|
||||||
eo::log << eo::progress << "End of Generation" << endl;
|
eo::log << eo::progress << "End of Generation" << endl;
|
||||||
}
|
|
||||||
else // a one-liner
|
} else { // else verbose
|
||||||
{
|
for (iterator it = vec.begin (); it != vec.end (); ++it) {
|
||||||
for(iterator it = vec.begin(); it != vec.end(); ++it)
|
// value only
|
||||||
{
|
cout << (*it)->getValue () << delim;
|
||||||
cout << (*it)->getValue() << delim;
|
} // for it in vec
|
||||||
}
|
|
||||||
cout << endl;
|
cout << endl;
|
||||||
}
|
} // if verbose
|
||||||
return *this;
|
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Reference in a new issue