/* @file printer.hpp */ #pragma once #include namespace xo { namespace print { /* print an event to a logfile * intended to be usable as EventSink argument * to RealizationSimSource */ template 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 */