MCPcopy Create free account
hub / github.com/MITK/MITK / OutputStream

Method OutputStream

Modules/Core/src/IO/mitkAbstractFileWriter.cpp:72–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

GetOutputStreamMethod · 0.80
GetOutputLocationMethod · 0.80
initMethod · 0.45

Tested by

no test coverage detected