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>

Public Types

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

Public Member Functions

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

Private Member Functions

void Read ()
 

Private Attributes

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

Detailed Description

File byte stream for input using fread().

Note
implements Stream concept

Definition at line 34 of file filereadstream.h.

Member Typedef Documentation

typedef char FileReadStream::Ch

Character type (byte).

Definition at line 36 of file filereadstream.h.

Constructor & Destructor Documentation

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.

Definition at line 44 of file filereadstream.h.

Member Function Documentation

void FileReadStream::Flush ( )
inline

Definition at line 56 of file filereadstream.h.

Ch FileReadStream::Peek ( ) const
inline

Definition at line 50 of file filereadstream.h.

const Ch* FileReadStream::Peek4 ( ) const
inline

Definition at line 61 of file filereadstream.h.

void FileReadStream::Put ( Ch  )
inline

Definition at line 55 of file filereadstream.h.

Ch* FileReadStream::PutBegin ( )
inline

Definition at line 57 of file filereadstream.h.

size_t FileReadStream::PutEnd ( Ch )
inline

Definition at line 58 of file filereadstream.h.

void FileReadStream::Read ( )
inlineprivate

Definition at line 66 of file filereadstream.h.

Ch FileReadStream::Take ( )
inline

Definition at line 51 of file filereadstream.h.

size_t FileReadStream::Tell ( ) const
inline

Definition at line 52 of file filereadstream.h.

Member Data Documentation

Ch* FileReadStream::buffer_
private

Definition at line 84 of file filereadstream.h.

Ch* FileReadStream::bufferLast_
private

Definition at line 86 of file filereadstream.h.

size_t FileReadStream::bufferSize_
private

Definition at line 85 of file filereadstream.h.

size_t FileReadStream::count_
private

Number of characters read.

Definition at line 89 of file filereadstream.h.

Ch* FileReadStream::current_
private

Definition at line 87 of file filereadstream.h.

bool FileReadStream::eof_
private

Definition at line 90 of file filereadstream.h.

std::FILE* FileReadStream::fp_
private

Definition at line 83 of file filereadstream.h.

size_t FileReadStream::readCount_
private

Definition at line 88 of file filereadstream.h.


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


choreo_rapidjson
Author(s):
autogenerated on Thu Jul 18 2019 03:59:10