A concrete implementation of StreamFactory that instantiates MemoryInputStreams for a fixed collection of DataViews.
More...
#include <bond/io/memorystreamfactory.h>
A concrete implementation of StreamFactory that instantiates MemoryInputStreams for a fixed collection of DataViews.
◆ MemoryStreamFactory()
Constructs a MemoryStreamFactory object.
- Parameters
-
| allocator | The memory allocator from which MemoryInputStreams are allocated. |
| index | The index of DataViews from which MemoryInputStreams are instantiated. |
| delegateFactory | If this factory cannot provide an InputStream, this factory is used as a fallback. |
| throwOnFailure | If true, stream creation failures are reported by throwing an Exception. Otherwise, stream creation failures return a null handle. |
◆ ~MemoryStreamFactory()
| virtual Bond::MemoryStreamFactory::~MemoryStreamFactory |
( |
| ) |
|
|
inlinevirtual |
◆ CreateInputStream()
| virtual InputStreamHandle Bond::MemoryStreamFactory::CreateInputStream |
( |
const char * | fileName | ) |
|
|
overridevirtual |
Returns an owning pointer to a dynamically allocated InputStream.
- Parameters
-
| fileName | The name of the file for which an input stream is created. |
Implements Bond::StreamFactory.
◆ CreateOutputStream()
| virtual OutputStreamHandle Bond::MemoryStreamFactory::CreateOutputStream |
( |
const char * | fileName, |
|
|
bool | append ) |
|
overridevirtual |
Returns an owning pointer to a dynamically allocated OutputStream.
- Parameters
-
| fileName | The name of the file for which an output stream is created. |
| append | Whether bytes are written to the end of an existing file. |
Implements Bond::StreamFactory.
◆ SetDelegateFactory()
| void Bond::MemoryStreamFactory::SetDelegateFactory |
( |
StreamFactory * | delegateFactory | ) |
|
|
inline |
Sets the fallback StreamFactory used when this factory cannot provide a stream.
- Parameters
-
The documentation for this class was generated from the following file:
- include/bond/io/memorystreamfactory.h