adding iris benchmark
[c11concurrency-benchmarks.git] / iris / include / stream_writer.h
1 #ifndef IRIS_STREAM_WRITER_H_
2 #define IRIS_STREAM_WRITER_H_
3
4
5 #include <cstdio>
6 #include <string>
7
8 #include "writer.h"
9
10 namespace iris {
11
12 // A log writer that appends logs to a standard stream.
13 class stream_writer: public writer {
14 public:
15     stream_writer(FILE * stream);
16     virtual void write(const char * msg);
17     virtual void write(const char * buffer, size_t len);
18 protected:
19     FILE *      m_stream;
20     int         m_fd;
21 };
22
23 }
24
25 #endif