2010-03-04 11:26:13 +01:00
|
|
|
#include "outputterminal.hh"
|
2011-04-05 11:52:06 +02:00
|
|
|
#include "resultlist.hh"
|
2011-07-23 13:18:13 +02:00
|
|
|
#include "configuration.hh"
|
2010-03-04 11:26:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void OutputTerminal::write(const Result &result)
|
|
|
|
{
|
|
|
|
output_stream << result << '\n' ;
|
|
|
|
}
|
2011-04-05 11:52:06 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void OutputTerminal::write(const ResultList &results)
|
|
|
|
{
|
2011-06-29 17:36:59 +02:00
|
|
|
if (results.empty())
|
|
|
|
output_stream << "There is no result.\n" ;
|
|
|
|
else
|
|
|
|
output_stream << results << '\n' ;
|
2011-07-23 13:18:13 +02:00
|
|
|
if (Configuration::bool_value("flush-output-files"))
|
|
|
|
output_stream << std::flush ;
|
2011-04-05 11:52:06 +02:00
|
|
|
}
|