Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
FileReadStream Class Reference

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

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/common/arccore/common/internal/json/rapidjson/filereadstream.h>

Collaboration diagram for FileReadStream:

Public Types

typedef char Ch
 Character type (byte).

Public Member Functions

 FileReadStream (std::FILE *fp, char *buffer, size_t bufferSize)
 Constructor.
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.
bool eof_

Detailed Description

File byte stream for input using fread().

Note
implements Stream concept

Definition at line 35 of file filereadstream.h.

Member Typedef Documentation

◆ Ch

typedef char FileReadStream::Ch

Character type (byte).

Definition at line 37 of file filereadstream.h.

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.

Definition at line 45 of file filereadstream.h.

References count_, and RAPIDJSON_ASSERT.

Member Function Documentation

◆ Flush()

void FileReadStream::Flush ( )
inline

Definition at line 57 of file filereadstream.h.

◆ Peek()

Ch FileReadStream::Peek ( ) const
inline

Definition at line 51 of file filereadstream.h.

◆ Peek4()

const Ch * FileReadStream::Peek4 ( ) const
inline

Definition at line 62 of file filereadstream.h.

◆ Put()

void FileReadStream::Put ( Ch )
inline

Definition at line 56 of file filereadstream.h.

◆ PutBegin()

Ch * FileReadStream::PutBegin ( )
inline

Definition at line 58 of file filereadstream.h.

◆ PutEnd()

size_t FileReadStream::PutEnd ( Ch * )
inline

Definition at line 59 of file filereadstream.h.

◆ Read()

void FileReadStream::Read ( )
inlineprivate

Definition at line 67 of file filereadstream.h.

◆ Take()

Ch FileReadStream::Take ( )
inline

Definition at line 52 of file filereadstream.h.

◆ Tell()

size_t FileReadStream::Tell ( ) const
inline

Definition at line 53 of file filereadstream.h.

Member Data Documentation

◆ buffer_

Ch* FileReadStream::buffer_
private

Definition at line 85 of file filereadstream.h.

◆ bufferLast_

Ch* FileReadStream::bufferLast_
private

Definition at line 87 of file filereadstream.h.

◆ bufferSize_

size_t FileReadStream::bufferSize_
private

Definition at line 86 of file filereadstream.h.

◆ count_

size_t FileReadStream::count_
private

Number of characters read.

Definition at line 90 of file filereadstream.h.

Referenced by FileReadStream().

◆ current_

Ch* FileReadStream::current_
private

Definition at line 88 of file filereadstream.h.

◆ eof_

bool FileReadStream::eof_
private

Definition at line 91 of file filereadstream.h.

◆ fp_

std::FILE* FileReadStream::fp_
private

Definition at line 84 of file filereadstream.h.

◆ readCount_

size_t FileReadStream::readCount_
private

Definition at line 89 of file filereadstream.h.


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