You.i Engine
CYIReadOnlyFILEBuffer Class Reference

Detailed Description

An implementation of std::streambuf backed by a YI_FILE handle. The wrapper uses YI_FREAD, YI_FSEEK and YI_FTELL, and only supports read operations.

Warning
This wrapper does not close the associated YI_FILE object when the wrapper is destroyed.

#include <utility/YiUtilities.h>

Inheritance diagram for CYIReadOnlyFILEBuffer:

Public Member Functions

 CYIReadOnlyFILEBuffer (YI_FILE *pFile, size_t bufferSize=1024)
 
virtual std::streambuf::int_type underflow () override
 
virtual std::streampos seekpos (std::streampos sp, std::ios_base::openmode which) override
 
virtual std::streampos seekoff (std::streamoff off, std::ios_base::seekdir way, std::ios_base::openmode which) override
 

Protected Attributes

YI_FILEm_pFile
 
std::vector< char > m_buffer
 

Constructor & Destructor Documentation

◆ CYIReadOnlyFILEBuffer()

CYIReadOnlyFILEBuffer::CYIReadOnlyFILEBuffer ( YI_FILE pFile,
size_t  bufferSize = 1024 
)

Member Function Documentation

◆ seekoff()

virtual std::streampos CYIReadOnlyFILEBuffer::seekoff ( std::streamoff  off,
std::ios_base::seekdir  way,
std::ios_base::openmode  which 
)
overridevirtual

◆ seekpos()

virtual std::streampos CYIReadOnlyFILEBuffer::seekpos ( std::streampos  sp,
std::ios_base::openmode  which 
)
overridevirtual

◆ underflow()

virtual std::streambuf::int_type CYIReadOnlyFILEBuffer::underflow ( )
overridevirtual

Member Data Documentation

◆ m_buffer

std::vector<char> CYIReadOnlyFILEBuffer::m_buffer
protected

◆ m_pFile

YI_FILE* CYIReadOnlyFILEBuffer::m_pFile
protected

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