libkazv
Kazv::FileProvider Class Reference

#include <file-desc.hpp>

Public Member Functions

template<class DeriveT >
 FileProvider (DeriveT &&o)
 Constructor. More...
 
 FileProvider (const FileProvider &that)
 
 FileProvider (FileProvider &&that)
 
FileProvideroperator= (const FileProvider &that)
 
FileProvideroperator= (FileProvider &&that)
 
FileStream getStream (FileOpenMode mode=FileOpenMode::Read) const
 Get the file stream provided by this. More...
 

Constructor & Destructor Documentation

◆ FileProvider() [1/3]

template<class DeriveT >
Kazv::FileProvider::FileProvider ( DeriveT &&  o)
inline

Constructor.

Construct a FileProvider using o.

o should be of a copyable type T that has a method getStream() that takes a FileOpenMode and returns something implicitly convertible to FileStream.

That is, [o]() -> FileStream { return o.getStream(FileOpenMode::Read); } must be well-formed.

In addition, if the FileOpenMode passed to getStream is FileOpenMode::Read, the returned stream must support read(); if the FileOpenMode passed to getStream is FileOpenMode::Write, the returned stream must support write().

◆ FileProvider() [2/3]

Kazv::FileProvider::FileProvider ( const FileProvider that)
inline

◆ FileProvider() [3/3]

Kazv::FileProvider::FileProvider ( FileProvider &&  that)
inline

Member Function Documentation

◆ getStream()

FileStream Kazv::FileProvider::getStream ( FileOpenMode  mode = FileOpenMode::Read) const
inline

Get the file stream provided by this.

Returns
a FileStream that will contain the content of the file provided by this.

◆ operator=() [1/2]

FileProvider& Kazv::FileProvider::operator= ( const FileProvider that)
inline

◆ operator=() [2/2]

FileProvider& Kazv::FileProvider::operator= ( FileProvider &&  that)
inline

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