paradiseo/eo/src/utils/eoStdoutMonitor.cpp
2000-10-27 09:13:06 +00:00

37 lines
739 B
C++

#include <iostream>
#include <fstream>
#include <stdexcept>
#include <utils/eoStdoutMonitor.h>
#include <utils/compatibility.h>
#include <utils/eoParam.h>
using namespace std;
eoMonitor& eoStdoutMonitor::operator()(void)
{
if (firsttime)
{
cout << "First Generation" << endl;
firsttime = false;
}
// ok, now the real saving. write out
if (!cout)
{
string str = "eoStdoutMonitor: Could not write to cout";
throw runtime_error(str);
}
for(iterator it = vec.begin(); it != vec.end(); ++it)
{
cout << (*it)->longName() << ": " << (*it)->getValue() << '\n';
}
cout << "\n****** End of Generation ******\n" << endl; // endl: flush
return *this;
}