| 70 | } |
| 71 | |
| 72 | AbstractFileWriter::OutputStream::OutputStream(IFileWriter *writer, std::ios_base::openmode mode) |
| 73 | : std::ostream(nullptr), m_Stream(nullptr) |
| 74 | { |
| 75 | std::ostream *stream = writer->GetOutputStream(); |
| 76 | if (stream) |
| 77 | { |
| 78 | this->init(stream->rdbuf()); |
| 79 | } |
| 80 | else |
| 81 | { |
| 82 | m_Stream = new std::ofstream(writer->GetOutputLocation().c_str(), mode); |
| 83 | this->init(m_Stream->rdbuf()); |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | AbstractFileWriter::OutputStream::~OutputStream() { delete m_Stream; } |
| 88 | class AbstractFileWriter::Impl : public FileReaderWriterBase |
nothing calls this directly
no test coverage detected