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

Provides functions to serialize data to strings and files. More...

#include <OutputProvider.h>

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

Public Types

enum  OpenMode { BINARY, TEXT }
 

Public Member Functions

virtual std::ostream & text ()=0
 
virtual std::ostream & openFile (const std::string &ext="", const OpenMode mode=BINARY)=0
 
virtual std::ostream & file ()=0
 

Detailed Description

Provides functions to serialize data to strings and files.

Member Enumeration Documentation

§ OpenMode

The possible modes for file access.

Enumerator
BINARY 

Access the file as binary file.

TEXT 

Access the file as text file.

Member Function Documentation

§ file()

virtual std::ostream& stromx::runtime::OutputProvider::file ( )
pure virtual

Returns the output stream which accepts the file representation of the data.

Exceptions
WrongStateIf the input provider has not been correctly initialized or if openFile() has not been called before calling this function.

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

§ openFile()

virtual std::ostream& stromx::runtime::OutputProvider::openFile ( const std::string &  ext = "",
const OpenMode  mode = BINARY 
)
pure virtual

Opens the file representation of the data and returns the associated output stream.

Exceptions
WrongStateIf the input provider has not been correctly initialized or if this function has already been called.
FileAccessFailedIf the file could not be opened.

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

§ text()

virtual std::ostream& stromx::runtime::OutputProvider::text ( )
pure virtual

Returns an output stream which accepts the text representation of the data.

Exceptions
WrongStateIf the input provider has not been correctly initialized.

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


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