RetroArch
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
FileReadStream Class Reference

File byte stream for input using fread(). More...

#include <filereadstream.h>

Collaboration diagram for FileReadStream:
[legend]

Public Types

typedef char Ch
 Character type (byte). More...
 

Public Member Functions

 FileReadStream (std::FILE *fp, char *buffer, size_t bufferSize)
 Constructor. More...
 
Ch Peek () const
 
Ch Take ()
 
size_t Tell () const
 
void Put (Ch)
 
void Flush ()
 
ChPutBegin ()
 
size_t PutEnd (Ch *)
 
const ChPeek4 () const
 

Private Member Functions

void Read ()
 

Private Attributes

std::FILEfp_
 
Chbuffer_
 
size_t bufferSize_
 
ChbufferLast_
 
Chcurrent_
 
size_t readCount_
 
size_t count_
 Number of characters read. More...
 
bool eof_
 

Detailed Description

File byte stream for input using fread().

Note
implements Stream concept

Member Typedef Documentation

◆ Ch

typedef char FileReadStream::Ch

Character type (byte).

Constructor & Destructor Documentation

◆ FileReadStream()

FileReadStream::FileReadStream ( std::FILE fp,
char *  buffer,
size_t  bufferSize 
)
inline

Constructor.

Parameters
fpFile pointer opened for read.
bufferuser-supplied buffer.
bufferSizesize of buffer in bytes. Must >=4 bytes.
Here is the call graph for this function:

Member Function Documentation

◆ Flush()

void FileReadStream::Flush ( )
inline

◆ Peek()

Ch FileReadStream::Peek ( ) const
inline

◆ Peek4()

const Ch* FileReadStream::Peek4 ( ) const
inline

◆ Put()

void FileReadStream::Put ( Ch  )
inline

◆ PutBegin()

Ch* FileReadStream::PutBegin ( )
inline

◆ PutEnd()

size_t FileReadStream::PutEnd ( Ch )
inline

◆ Read()

void FileReadStream::Read ( )
inlineprivate
Here is the caller graph for this function:

◆ Take()

Ch FileReadStream::Take ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Tell()

size_t FileReadStream::Tell ( ) const
inline
Here is the caller graph for this function:

Member Data Documentation

◆ buffer_

Ch* FileReadStream::buffer_
private

◆ bufferLast_

Ch* FileReadStream::bufferLast_
private

◆ bufferSize_

size_t FileReadStream::bufferSize_
private

◆ count_

size_t FileReadStream::count_
private

Number of characters read.

◆ current_

Ch* FileReadStream::current_
private

◆ eof_

bool FileReadStream::eof_
private

◆ fp_

std::FILE* FileReadStream::fp_
private

◆ readCount_

size_t FileReadStream::readCount_
private

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