indentlog: refactor: move stream-inserters to print/ subdir
This commit is contained in:
parent
5c60277610
commit
efe207a4de
19 changed files with 9 additions and 9 deletions
|
|
@ -1,28 +0,0 @@
|
|||
/* @file printer.hpp */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <utility>
|
||||
|
||||
namespace xo {
|
||||
namespace print {
|
||||
/* print an event to a logfile
|
||||
* intended to be usable as EventSink argument
|
||||
* to RealizationSimSource<T, EventSink>
|
||||
*/
|
||||
template<typename T, typename Stream>
|
||||
class printer {
|
||||
public:
|
||||
printer(Stream && os) : os_{std::move(os)} {}
|
||||
|
||||
void operator()(T const & x) {
|
||||
this->os_ << x;
|
||||
}
|
||||
|
||||
private:
|
||||
Stream os_;
|
||||
}; /*printer*/
|
||||
} /*namespace print*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end printer.hpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue