Bond 0.9
C++ Bond Runtime Library API Documentation
Loading...
Searching...
No Matches
Bond::StdioStreamFactory Class Reference

A concrete implementation of StreamFactory that creates instances of StdioInputStream and StdioOutputStream. More...

#include <bond/io/stdiostreamfactory.h>

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

Public Member Functions

 StdioStreamFactory (Allocator &allocator, const char *rootPath=nullptr, StreamFactory *delegateFactory=nullptr, bool throwOnFailure=true)
 
virtual ~StdioStreamFactory ()
 
virtual InputStreamHandle CreateInputStream (const char *fileName) override
 Returns an owning pointer to a dynamically allocated InputStream. More...
 
virtual OutputStreamHandle CreateOutputStream (const char *fileName, bool append=false) override
 Returns an owning pointer to a dynamically allocated OutputStream. More...
 
void SetRootPath (const char *rootPath)
 
void SetDelegateFactory (StreamFactory *delegateFactory)
 
- Public Member Functions inherited from Bond::StreamFactory
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

A concrete implementation of StreamFactory that creates instances of StdioInputStream and StdioOutputStream.

Constructor & Destructor Documentation

◆ StdioStreamFactory()

Bond::StdioStreamFactory::StdioStreamFactory ( Allocator allocator,
const char *  rootPath = nullptr,
StreamFactory delegateFactory = nullptr,
bool  throwOnFailure = true 
)
inlineexplicit

◆ ~StdioStreamFactory()

virtual Bond::StdioStreamFactory::~StdioStreamFactory ( )
inlinevirtual

Member Function Documentation

◆ CreateInputStream()

virtual InputStreamHandle Bond::StdioStreamFactory::CreateInputStream ( const char *  fileName)
overridevirtual

Returns an owning pointer to a dynamically allocated InputStream.

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

Implements Bond::StreamFactory.

◆ CreateOutputStream()

virtual OutputStreamHandle Bond::StdioStreamFactory::CreateOutputStream ( const char *  fileName,
bool  append = false 
)
overridevirtual

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.

Implements Bond::StreamFactory.

◆ SetDelegateFactory()

void Bond::StdioStreamFactory::SetDelegateFactory ( StreamFactory delegateFactory)
inline

◆ SetRootPath()

void Bond::StdioStreamFactory::SetRootPath ( const char *  rootPath)
inline

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