File output which stores the output data in single files in a common directory.
More...
#include <DirectoryFileOutput.h>
File output which stores the output data in single files in a common directory.
§ DirectoryFileOutput()
| stromx::runtime::DirectoryFileOutput::DirectoryFileOutput |
( |
const std::string & |
directory | ) |
|
|
inlineexplicit |
Constructs a directory file output which stores data in a directory.
- Parameters
-
| directory | The path to the directory. |
§ close()
| void stromx::runtime::DirectoryFileOutput::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::DirectoryFileOutput::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::DirectoryFileOutput::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::DirectoryFileOutput::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::DirectoryFileOutput::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::DirectoryFileOutput::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::DirectoryFileOutput::text |
( |
| ) |
|
|
virtual |
The documentation for this class was generated from the following files: