FileReadStream

Engine/source/persistence/rapidjson/filereadstream.h

File byte stream for input using fread().

More...

Public Types

char
Ch 

Character type (byte).

Private Attributes

size_t
size_t

Number of characters read.

bool
std::FILE *
size_t

Public Functions

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

Constructor.

Peek()
size_t
PutEnd(Ch * )
Take()
size_t
Tell()

Private Functions

Detailed Description

File byte stream for input using fread().

note:

implements Stream concept

Public Types

typedef char Ch 

Character type (byte).

Private Attributes

Ch * buffer_ 
Ch * bufferLast_ 
size_t bufferSize_ 
size_t count_ 

Number of characters read.

Ch * current_ 
bool eof_ 
std::FILE * fp_ 
size_t readCount_ 

Public Functions

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

Constructor.

Parameters:

fp

File pointer opened for read.

buffer

user-supplied buffer.

bufferSize

size of buffer in bytes. Must >=4 bytes.

Flush()

Peek()

Peek4()

Put(Ch )

PutBegin()

PutEnd(Ch * )

Take()

Tell()

Private Functions

Read()