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 38 of file filereadstream.h.

Member Typedef Documentation

typedef char FileReadStream::Ch

Character type (byte).

Definition at line 40 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 48 of file filereadstream.h.

Member Function Documentation

void FileReadStream::Flush ( )
inline

Definition at line 74 of file filereadstream.h.

Ch FileReadStream::Peek ( ) const
inline

Definition at line 62 of file filereadstream.h.

const Ch* FileReadStream::Peek4 ( ) const
inline

Definition at line 85 of file filereadstream.h.

void FileReadStream::Put ( Ch  )
inline

Definition at line 73 of file filereadstream.h.

Ch* FileReadStream::PutBegin ( )
inline

Definition at line 75 of file filereadstream.h.

size_t FileReadStream::PutEnd ( Ch )
inline

Definition at line 79 of file filereadstream.h.

void FileReadStream::Read ( )
inlineprivate

Definition at line 90 of file filereadstream.h.

Ch FileReadStream::Take ( )
inline

Definition at line 63 of file filereadstream.h.

size_t FileReadStream::Tell ( ) const
inline

Definition at line 68 of file filereadstream.h.

Member Data Documentation

Ch* FileReadStream::buffer_
private

Definition at line 108 of file filereadstream.h.

Ch* FileReadStream::bufferLast_
private

Definition at line 110 of file filereadstream.h.

size_t FileReadStream::bufferSize_
private

Definition at line 109 of file filereadstream.h.

size_t FileReadStream::count_
private

Number of characters read.

Definition at line 113 of file filereadstream.h.

Ch* FileReadStream::current_
private

Definition at line 111 of file filereadstream.h.

bool FileReadStream::eof_
private

Definition at line 114 of file filereadstream.h.

std::FILE* FileReadStream::fp_
private

Definition at line 107 of file filereadstream.h.

size_t FileReadStream::readCount_
private

Definition at line 112 of file filereadstream.h.


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


livox_ros_driver
Author(s): Livox Dev Team
autogenerated on Mon Mar 15 2021 02:40:46