1 | #ifndef FASTUIDRAW_DEMO_STREAM_HOLDER_HPP |
---|---|
2 | #define FASTUIDRAW_DEMO_STREAM_HOLDER_HPP |
3 | |
4 | #include <ostream> |
5 | #include <string> |
6 | #include <fastuidraw/util/reference_counted.hpp> |
7 | |
8 | class StreamHolder: |
9 | public fastuidraw::reference_counted<StreamHolder>::concurrent |
10 | { |
11 | public: |
12 | StreamHolder(const std::string &filename); |
13 | ~StreamHolder(); |
14 | |
15 | std::ostream& |
16 | stream(void) |
17 | { |
18 | return *m_stream; |
19 | } |
20 | private: |
21 | std::ostream *m_stream; |
22 | bool m_delete_stream; |
23 | }; |
24 | |
25 | #endif |
26 |