| 74 | std::ofstream m_ofs; |
| 75 | public: |
| 76 | FileStream( std::string const& filename ) { |
| 77 | m_ofs.open( filename.c_str() ); |
| 78 | CATCH_ENFORCE( !m_ofs.fail(), "Unable to open file: '" << filename << '\'' ); |
| 79 | m_ofs << std::unitbuf; |
| 80 | } |
| 81 | public: // IStream |
| 82 | std::ostream& stream() override { |
| 83 | return m_ofs; |