* indentations + whitespace cleanup
This commit is contained in:
parent
8457e39efe
commit
56c6edab04
285 changed files with 6068 additions and 6223 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#ifdef _MSC_VER
|
||||
// to avoid long name warnings
|
||||
#pragma warning(disable:4786)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
|
@ -32,21 +32,21 @@ void eoFileMonitor::printHeader(std::ostream& os)
|
|||
void eoFileMonitor::printHeader()
|
||||
{
|
||||
// create file
|
||||
ofstream os(filename.c_str());
|
||||
ofstream os(filename.c_str());
|
||||
|
||||
if (!os)
|
||||
{
|
||||
string str = "eoFileMonitor could not open: " + filename;
|
||||
throw runtime_error(str);
|
||||
}
|
||||
|
||||
|
||||
printHeader(os);
|
||||
}
|
||||
|
||||
eoMonitor& eoFileMonitor::operator()(void)
|
||||
{
|
||||
ofstream os(filename.c_str(),
|
||||
overwrite ?
|
||||
ofstream os(filename.c_str(),
|
||||
overwrite ?
|
||||
ios_base::out|ios_base::trunc // truncate
|
||||
:
|
||||
ios_base::out|ios_base::app // append
|
||||
|
|
@ -58,7 +58,7 @@ eoMonitor& eoFileMonitor::operator()(void)
|
|||
throw runtime_error(str);
|
||||
}
|
||||
|
||||
if (
|
||||
if (
|
||||
header // we want to write headers
|
||||
&& firstcall // we do not want to write headers twice
|
||||
&& !keep // if we append to an existing file, headers are useless
|
||||
|
|
@ -67,17 +67,17 @@ eoMonitor& eoFileMonitor::operator()(void)
|
|||
printHeader();
|
||||
firstcall = false;
|
||||
}
|
||||
|
||||
|
||||
return operator()(os);
|
||||
}
|
||||
|
||||
eoMonitor& eoFileMonitor::operator()(std::ostream& os)
|
||||
{
|
||||
|
||||
|
||||
iterator it = vec.begin();
|
||||
|
||||
|
||||
os << (*it)->getValue();
|
||||
|
||||
|
||||
for(++it; it != vec.end(); ++it)
|
||||
{
|
||||
os << delim.c_str() << (*it)->getValue();
|
||||
|
|
@ -87,4 +87,3 @@ eoMonitor& eoFileMonitor::operator()(std::ostream& os)
|
|||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue