|
Bond 0.9
C++ Bond Runtime Library API Documentation
|
An abstract interface for creating file streams without being coupled to any particular concrete type of stream. More...
#include <bond/io/streamfactory.h>
Public Member Functions | |
| virtual | ~StreamFactory () |
| Destroys a StreamFactory object. | |
| virtual InputStreamHandle | CreateInputStream (const char *fileName)=0 |
| Returns an owning pointer to a dynamically allocated InputStream. | |
| virtual OutputStreamHandle | CreateOutputStream (const char *fileName, bool append)=0 |
| Returns an owning pointer to a dynamically allocated OutputStream. | |
An abstract interface for creating file streams without being coupled to any particular concrete type of stream.
Implementations report a failure to create a stream either by throwing a Bond::Exception or by returning a null handle.
|
inlinevirtual |
Destroys a StreamFactory object.
|
pure virtual |
Returns an owning pointer to a dynamically allocated InputStream.
| fileName | The name of the file for which an input stream is created, encoded in UTF-8. |
Implemented in Bond::MemoryStreamFactory, and Bond::StdioStreamFactory.
|
pure virtual |
Returns an owning pointer to a dynamically allocated OutputStream.
| fileName | The name of the file for which an output stream is created, encoded in UTF-8. |
| append | Whether bytes are written to the end of an existing file. |
Implemented in Bond::MemoryStreamFactory, and Bond::StdioStreamFactory.