Bond 0.9
C++ Bond Runtime Library API Documentation
Loading...
Searching...
No Matches
Bond::StreamFactory Class Referenceabstract

An abstract interface for creating file streams without being coupled to any particular concrete type of stream. More...

#include <bond/io/streamfactory.h>

Inheritance diagram for Bond::StreamFactory:
Bond::MemoryStreamFactory Bond::StdioStreamFactory

Public Member Functions

virtual ~StreamFactory ()
 
virtual InputStreamHandle CreateInputStream (const char *fileName)=0
 Returns an owning pointer to a dynamically allocated InputStream. More...
 
virtual OutputStreamHandle CreateOutputStream (const char *fileName, bool append)=0
 Returns an owning pointer to a dynamically allocated OutputStream. More...
 

Detailed Description

An abstract interface for creating file streams without being coupled to any particular concrete type of stream.

Constructor & Destructor Documentation

◆ ~StreamFactory()

virtual Bond::StreamFactory::~StreamFactory ( )
inlinevirtual

Member Function Documentation

◆ CreateInputStream()

virtual InputStreamHandle Bond::StreamFactory::CreateInputStream ( const char *  fileName)
pure virtual

Returns an owning pointer to a dynamically allocated InputStream.

Parameters
fileNameThe name of the file for which an input stream is created.

Implemented in Bond::MemoryStreamFactory, and Bond::StdioStreamFactory.

◆ CreateOutputStream()

virtual OutputStreamHandle Bond::StreamFactory::CreateOutputStream ( const char *  fileName,
bool  append 
)
pure virtual

Returns an owning pointer to a dynamically allocated OutputStream.

Parameters
fileNameThe name of the file for which an Output stream is created.
appendWhether bytes are written to the end of an existing file.

Implemented in Bond::MemoryStreamFactory, and Bond::StdioStreamFactory.


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