cphot 0.1
A C++ tool for computing photometry from spectra.
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...
 
Ch Peek () const
 
Ch Take ()
 
size_t Tell () const
 
void Put (Ch)
 
void Flush ()
 
ChPutBegin ()
 
size_t PutEnd (Ch *)
 
const ChPeek4 () const
 

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

typedef char FileReadStream::Ch

Character type (byte).

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

Member Function Documentation

◆ Flush()

void FileReadStream::Flush ( )
inline

Definition at line 56 of file filereadstream.h.

◆ Peek()

Ch FileReadStream::Peek ( ) const
inline

Definition at line 50 of file filereadstream.h.

◆ Peek4()

const Ch* FileReadStream::Peek4 ( ) const
inline

Definition at line 61 of file filereadstream.h.

◆ Put()

void FileReadStream::Put ( Ch  )
inline

Definition at line 55 of file filereadstream.h.

◆ PutBegin()

Ch* FileReadStream::PutBegin ( )
inline

Definition at line 57 of file filereadstream.h.

◆ PutEnd()

size_t FileReadStream::PutEnd ( Ch )
inline

Definition at line 58 of file filereadstream.h.

◆ Take()

Ch FileReadStream::Take ( )
inline

Definition at line 51 of file filereadstream.h.

◆ Tell()

size_t FileReadStream::Tell ( ) const
inline

Definition at line 52 of file filereadstream.h.


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