NCBI C++ ToolKit
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
rapidjson::FileReadStream Class Reference

Search Toolkit Book for rapidjson::FileReadStream

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

#include <misc/jsonwrapp/rapidjson11/filereadstream.h>

+ Collaboration diagram for rapidjson::FileReadStream:

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::FILE * fp_
 
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

Definition at line 34 of file filereadstream.h.

Member Typedef Documentation

◆ Ch

Character type (byte).

Definition at line 36 of file filereadstream.h.

Constructor & Destructor Documentation

◆ FileReadStream()

rapidjson::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.

References RAPIDJSON_ASSERT, and Read().

Member Function Documentation

◆ Flush()

void rapidjson::FileReadStream::Flush ( void  )
inline

Definition at line 56 of file filereadstream.h.

References RAPIDJSON_ASSERT.

◆ Peek()

Ch rapidjson::FileReadStream::Peek ( ) const
inline

Definition at line 50 of file filereadstream.h.

◆ Peek4()

const Ch* rapidjson::FileReadStream::Peek4 ( ) const
inline

Definition at line 61 of file filereadstream.h.

◆ Put()

void rapidjson::FileReadStream::Put ( Ch  )
inline

Definition at line 55 of file filereadstream.h.

References RAPIDJSON_ASSERT.

◆ PutBegin()

Ch* rapidjson::FileReadStream::PutBegin ( )
inline

Definition at line 57 of file filereadstream.h.

References RAPIDJSON_ASSERT.

◆ PutEnd()

size_t rapidjson::FileReadStream::PutEnd ( Ch )
inline

Definition at line 58 of file filereadstream.h.

References RAPIDJSON_ASSERT.

◆ Read()

void rapidjson::FileReadStream::Read ( )
inlineprivate

Definition at line 66 of file filereadstream.h.

◆ Take()

Ch rapidjson::FileReadStream::Take ( )
inline

Definition at line 51 of file filereadstream.h.

References Read().

◆ Tell()

size_t rapidjson::FileReadStream::Tell ( ) const
inline

Definition at line 52 of file filereadstream.h.

Member Data Documentation

◆ buffer_

Ch* rapidjson::FileReadStream::buffer_
private

Definition at line 84 of file filereadstream.h.

◆ bufferLast_

Ch* rapidjson::FileReadStream::bufferLast_
private

Definition at line 86 of file filereadstream.h.

◆ bufferSize_

size_t rapidjson::FileReadStream::bufferSize_
private

Definition at line 85 of file filereadstream.h.

◆ count_

size_t rapidjson::FileReadStream::count_
private

Number of characters read.

Definition at line 89 of file filereadstream.h.

◆ current_

Ch* rapidjson::FileReadStream::current_
private

Definition at line 87 of file filereadstream.h.

◆ eof_

bool rapidjson::FileReadStream::eof_
private

Definition at line 90 of file filereadstream.h.

◆ fp_

std::FILE* rapidjson::FileReadStream::fp_
private

Definition at line 83 of file filereadstream.h.

◆ readCount_

size_t rapidjson::FileReadStream::readCount_
private

Definition at line 88 of file filereadstream.h.


The documentation for this class was generated from the following file:
Modified on Tue Apr 16 20:11:11 2024 by modify_doxy.py rev. 669887