Skip to content
Snippets Groups Projects
  • Studer Gabriel's avatar
    93fd5743
    mmcif writer: move stream handling to StarWriter::Write · 93fd5743
    Studer Gabriel authored
    Before, we already opened a file and the respective stream at
    Writer initialization. This is weird when Write never gets called and
    and empty file remains on disk. Furthermore, Write just wrote to a stream.
    That stream was never flushed, so in principle you potentially called
    Write but even after completion, the file is not necessarily written
    to disk. Now, the file gets opened in Write, everything is written
    to the respective stream and once done, the destructor of the stream
    ensures that everything concludes.
    93fd5743
    History
    mmcif writer: move stream handling to StarWriter::Write
    Studer Gabriel authored
    Before, we already opened a file and the respective stream at
    Writer initialization. This is weird when Write never gets called and
    and empty file remains on disk. Furthermore, Write just wrote to a stream.
    That stream was never flushed, so in principle you potentially called
    Write but even after completion, the file is not necessarily written
    to disk. Now, the file gets opened in Write, everything is written
    to the respective stream and once done, the destructor of the stream
    ensures that everything concludes.