Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::AbstractFileWriter::LocalFile Class Reference

A local file representation for writers that cannot use streams. More...

#include <mitkAbstractFileWriter.h>

Public Member Functions

 LocalFile (IFileWriter *writer)
 Construct a LocalFile for the given writer. More...
 
 ~LocalFile ()
 Destructor. Writes temporary file contents to the output stream (if any) and removes the temporary file. More...
 
std::string GetFileName ()
 Get a local file name for writing. More...
 

Detailed Description

A local file representation for writers that cannot use streams.

If a writer can only work with local files, construct an instance of this class. It provides either the original output location (if no output stream was set) or a temporary file name. On destruction, the temporary file's contents are flushed to the output stream and the temporary file is removed.

Definition at line 190 of file mitkAbstractFileWriter.h.

Constructor & Destructor Documentation

◆ LocalFile()

mitk::AbstractFileWriter::LocalFile::LocalFile ( IFileWriter *  writer)

Construct a LocalFile for the given writer.

Parameters
[in]writerThe IFileWriter whose output configuration to use.

◆ ~LocalFile()

mitk::AbstractFileWriter::LocalFile::~LocalFile ( )

Destructor. Writes temporary file contents to the output stream (if any) and removes the temporary file.

Member Function Documentation

◆ GetFileName()

std::string mitk::AbstractFileWriter::LocalFile::GetFileName ( )

Get a local file name for writing.

Returns
The output location if no stream is set, or a path to a newly created temporary file otherwise.

The documentation for this class was generated from the following file: