stromx  0.8.0
Public Member Functions | List of all members
stromx::runtime::FileOutput Class Referenceabstract

Provides functions to initialize an output provider. More...

#include <FileOutput.h>

Inheritance diagram for stromx::runtime::FileOutput:
stromx::runtime::OutputProvider stromx::runtime::DirectoryFileOutput stromx::runtime::ZipFileOutput

Public Member Functions

virtual void initialize (const std::string &filename)=0
 
virtual const std::string & getFilename () const =0
 
virtual const std::string getText () const =0
 
virtual void close ()=0
 
- Public Member Functions inherited from stromx::runtime::OutputProvider
virtual std::ostream & text ()=0
 
virtual std::ostream & openFile (const std::string &ext="", const OpenMode mode=BINARY)=0
 
virtual std::ostream & file ()=0
 

Additional Inherited Members

- Public Types inherited from stromx::runtime::OutputProvider
enum  OpenMode { BINARY, TEXT }
 

Detailed Description

Provides functions to initialize an output provider.

Member Function Documentation

§ close()

virtual void stromx::runtime::FileOutput::close ( )
pure virtual

Closes the file output. If this functions is not called the output is closed by the destructor.

Exceptions
FileAccessFailedIf data could not be saved (e.g. due to missing write permission).

Implemented in stromx::runtime::ZipFileOutput, and stromx::runtime::DirectoryFileOutput.

§ getFilename()

virtual const std::string& stromx::runtime::FileOutput::getFilename ( ) const
pure 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
WrongStateIf no file has been opened by the client.

Implemented in stromx::runtime::ZipFileOutput, and stromx::runtime::DirectoryFileOutput.

§ getText()

virtual const std::string stromx::runtime::FileOutput::getText ( ) const
pure virtual

Returns the text representation of the data if it has already been set. Otherwise an empty string is returned.

Implemented in stromx::runtime::ZipFileOutput, and stromx::runtime::DirectoryFileOutput.

§ initialize()

virtual void stromx::runtime::FileOutput::initialize ( const std::string &  filename)
pure virtual

Initializes the output provider.

Parameters
filenameThe name of the file which accepts the file data without file extension.

Implemented in stromx::runtime::ZipFileOutput, and stromx::runtime::DirectoryFileOutput.


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