File output which stores the output data in a zip file.
More...
#include <ZipFileOutput.h>
|
| | ZipFileOutput (const std::string &archive) |
| |
| virtual void | initialize (const std::string &filename) |
| |
| virtual const std::string & | getFilename () const |
| |
| virtual const std::string | getText () const |
| |
| virtual std::ostream & | text () |
| |
| virtual std::ostream & | openFile (const std::string &ext, const OpenMode mode) |
| |
| virtual std::ostream & | file () |
| |
| virtual void | close () |
| |
File output which stores the output data in a zip file.
§ ZipFileOutput()
| stromx::runtime::ZipFileOutput::ZipFileOutput |
( |
const std::string & |
archive | ) |
|
|
explicit |
Constructs a file output which stores data in a zip file.
- Parameters
-
| archive | The path to the zip file. |
- Exceptions
-
§ close()
| void stromx::runtime::ZipFileOutput::close |
( |
| ) |
|
|
virtual |
Closes the file output. If this functions is not called the output is closed by the destructor.
- Exceptions
-
| FileAccessFailed | If data could not be saved (e.g. due to missing write permission). |
Implements stromx::runtime::FileOutput.
§ file()
| std::ostream & stromx::runtime::ZipFileOutput::file |
( |
| ) |
|
|
virtual |
Returns the output stream which accepts the file representation of the data.
- Exceptions
-
| WrongState | If the input provider has not been correctly initialized or if openFile() has not been called before calling this function. |
Implements stromx::runtime::OutputProvider.
§ getFilename()
| const std::string & stromx::runtime::ZipFileOutput::getFilename |
( |
| ) |
const |
|
virtual |
Returns the name of the current file including the correct file extension. If no file data was written an empty string is returned.
- Exceptions
-
| WrongState | If no file has been opened by the client. |
Implements stromx::runtime::FileOutput.
§ getText()
| const std::string stromx::runtime::ZipFileOutput::getText |
( |
| ) |
const |
|
virtual |
Returns the text representation of the data if it has already been set. Otherwise an empty string is returned.
Implements stromx::runtime::FileOutput.
§ initialize()
| void stromx::runtime::ZipFileOutput::initialize |
( |
const std::string & |
filename | ) |
|
|
virtual |
Initializes the output provider.
- Parameters
-
| filename | The name of the file which accepts the file data without file extension. |
Implements stromx::runtime::FileOutput.
§ openFile()
| std::ostream & stromx::runtime::ZipFileOutput::openFile |
( |
const std::string & |
ext, |
|
|
const OpenMode |
mode |
|
) |
| |
|
virtual |
Opens the file representation of the data and returns the associated output stream.
- Exceptions
-
| WrongState | If the input provider has not been correctly initialized or if this function has already been called. |
| FileAccessFailed | If the file could not be opened. |
Implements stromx::runtime::OutputProvider.
§ text()
| std::ostream & stromx::runtime::ZipFileOutput::text |
( |
| ) |
|
|
virtual |
The documentation for this class was generated from the following files: