SingleByteInputStream< InputStreamType, SIZE > Class Template Reference

A single-byte-reader wrapper around an InputStream. Optimised for reading one byte at a time. Uses a buffer to reduce the number of times the wrapped stream must be read. More...

#include <archivelib.h>

Collaboration diagram for SingleByteInputStream< InputStreamType, SIZE >:
Collaboration graph
[legend]

Public Member Functions

 SingleByteInputStream (InputStreamType &inputStream)
bool readByte (byte_type &b)

Private Types

typedef InputStreamType::byte_type byte_type

Private Attributes

InputStreamType & m_inputStream
byte_type m_buffer [SIZE]
byte_typem_cur
byte_typem_end

Detailed Description

template<typename InputStreamType, int SIZE = 1024>
class SingleByteInputStream< InputStreamType, SIZE >

A single-byte-reader wrapper around an InputStream. Optimised for reading one byte at a time. Uses a buffer to reduce the number of times the wrapped stream must be read.

Definition at line 36 of file archivelib.h.


Member Typedef Documentation

template<typename InputStreamType, int SIZE = 1024>
typedef InputStreamType::byte_type SingleByteInputStream< InputStreamType, SIZE >::byte_type [private]

Definition at line 32 of file archivelib.h.


Constructor & Destructor Documentation

template<typename InputStreamType, int SIZE = 1024>
SingleByteInputStream< InputStreamType, SIZE >::SingleByteInputStream ( InputStreamType &  inputStream  )  [inline]

Definition at line 41 of file archivelib.h.


Member Function Documentation

template<typename InputStreamType, int SIZE = 1024>
bool SingleByteInputStream< InputStreamType, SIZE >::readByte ( byte_type b  )  [inline]

Definition at line 45 of file archivelib.h.

Referenced by BinaryToTextInputStream< DeflatedInputStream >::read().


Field Documentation

template<typename InputStreamType, int SIZE = 1024>
byte_type SingleByteInputStream< InputStreamType, SIZE >::m_buffer[SIZE] [private]

Definition at line 35 of file archivelib.h.

template<typename InputStreamType, int SIZE = 1024>
byte_type* SingleByteInputStream< InputStreamType, SIZE >::m_cur [private]

Definition at line 36 of file archivelib.h.

template<typename InputStreamType, int SIZE = 1024>
byte_type* SingleByteInputStream< InputStreamType, SIZE >::m_end [private]

Definition at line 37 of file archivelib.h.

template<typename InputStreamType, int SIZE = 1024>
InputStreamType& SingleByteInputStream< InputStreamType, SIZE >::m_inputStream [private]

Definition at line 34 of file archivelib.h.


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

Generated by  doxygen 1.6.2