bioformats  5.1.0
Public Member Functions | Private Attributes | List of all members
ome::bioformats::FormatWriter::SaveSeries Class Reference

Sentry for saving and restoring writer series state. More...

#include <ome/bioformats/FormatWriter.h>

+ Collaboration diagram for ome::bioformats::FormatWriter::SaveSeries:

Public Member Functions

 SaveSeries (const FormatWriter &writer)
 Constructor. More...
 
 ~SaveSeries ()
 Destructor. More...
 

Private Attributes

const FormatWriterwriter
 Writer for which the state will be saved and restored.
 
dimension_size_type series
 Saved state.
 

Detailed Description

Sentry for saving and restoring writer series state.

For any FormatWriter method or subclass method which needs to set and later restore the series/coreIndex/resolution as part of its operation, this class exists to manage the safe restoration of the state. Create an instance of this class with the writer set to *this. When the instance goes out of scope, e.g. at the end of a block or method, or when an exception is thrown, the saved state will be transparently restored.

Constructor & Destructor Documentation

ome::bioformats::FormatWriter::SaveSeries::SaveSeries ( const FormatWriter writer)
inline

Constructor.

Parameters
writerthe writer to manage.
ome::bioformats::FormatWriter::SaveSeries::~SaveSeries ( )
inline

Destructor.

Saved state will be restored when run.

References ome::bioformats::FormatWriter::getSeries(), and ome::bioformats::FormatWriter::setSeries().


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