Chemical Data Processing Library C++ API - Version 1.4.0
Public Types | Public Member Functions | Protected Member Functions | List of all members
CDPL::Util::CompressionStreamBase< CompAlgo, StreamType > Class Template Reference

Base class for stream wrappers that buffer (de)compressed data through a temporary file. More...

#include <CompressionStreams.hpp>

+ Inheritance diagram for CDPL::Util::CompressionStreamBase< CompAlgo, StreamType >:

Public Types

typedef StreamType::char_type char_type
 The character type of the wrapped stream. More...
 
typedef StreamType::traits_type traits_type
 The character traits type of the wrapped stream. More...
 
typedef StreamType::int_type int_type
 The integer type used to represent characters and EOF. More...
 
typedef StreamType::pos_type pos_type
 The type used to represent stream positions. More...
 
typedef StreamType::off_type off_type
 The type used to represent stream offsets. More...
 
typedef std::basic_istream< char_type, traits_typeIStreamType
 Input-stream type with matching character and traits types. More...
 
typedef std::basic_ostream< char_type, traits_typeOStreamType
 Output-stream type with matching character and traits types. More...
 

Public Member Functions

 CompressionStreamBase ()
 Constructs the CompressionStreamBase instance and installs the temporary-file buffer. More...
 

Protected Member Functions

virtual ~CompressionStreamBase ()
 
void closeTmpFile ()
 
void openTmpFile ()
 
void decompInput (IStreamType &is)
 
void compOutput (OStreamType &os)
 

Detailed Description

template<CompressionAlgo CompAlgo, typename StreamType>
class CDPL::Util::CompressionStreamBase< CompAlgo, StreamType >

Base class for stream wrappers that buffer (de)compressed data through a temporary file.

Subclasses inherit a hidden std::basic_filebuf and use it as the working buffer while transparently compressing/decompressing data on open/close.

Template Parameters
CompAlgoThe compression algorithm identifier (see Util::CompressionAlgo).
StreamTypeThe standard stream type (std::basic_istream/ostream/iostream) to derive from.

Member Typedef Documentation

◆ char_type

template<CompressionAlgo CompAlgo, typename StreamType >
typedef StreamType::char_type CDPL::Util::CompressionStreamBase< CompAlgo, StreamType >::char_type

The character type of the wrapped stream.

◆ traits_type

template<CompressionAlgo CompAlgo, typename StreamType >
typedef StreamType::traits_type CDPL::Util::CompressionStreamBase< CompAlgo, StreamType >::traits_type

The character traits type of the wrapped stream.

◆ int_type

template<CompressionAlgo CompAlgo, typename StreamType >
typedef StreamType::int_type CDPL::Util::CompressionStreamBase< CompAlgo, StreamType >::int_type

The integer type used to represent characters and EOF.

◆ pos_type

template<CompressionAlgo CompAlgo, typename StreamType >
typedef StreamType::pos_type CDPL::Util::CompressionStreamBase< CompAlgo, StreamType >::pos_type

The type used to represent stream positions.

◆ off_type

template<CompressionAlgo CompAlgo, typename StreamType >
typedef StreamType::off_type CDPL::Util::CompressionStreamBase< CompAlgo, StreamType >::off_type

The type used to represent stream offsets.

◆ IStreamType

template<CompressionAlgo CompAlgo, typename StreamType >
typedef std::basic_istream<char_type, traits_type> CDPL::Util::CompressionStreamBase< CompAlgo, StreamType >::IStreamType

Input-stream type with matching character and traits types.

◆ OStreamType

template<CompressionAlgo CompAlgo, typename StreamType >
typedef std::basic_ostream<char_type, traits_type> CDPL::Util::CompressionStreamBase< CompAlgo, StreamType >::OStreamType

Output-stream type with matching character and traits types.

Constructor & Destructor Documentation

◆ CompressionStreamBase()

template<CDPL::Util::CompressionAlgo CompAlgo, typename StreamType >
CDPL::Util::CompressionStreamBase< CompAlgo, StreamType >::CompressionStreamBase

Constructs the CompressionStreamBase instance and installs the temporary-file buffer.

◆ ~CompressionStreamBase()

template<CompressionAlgo CompAlgo, typename StreamType >
virtual CDPL::Util::CompressionStreamBase< CompAlgo, StreamType >::~CompressionStreamBase ( )
inlineprotectedvirtual

Member Function Documentation

◆ closeTmpFile()

template<CDPL::Util::CompressionAlgo CompAlgo, typename StreamType >
void CDPL::Util::CompressionStreamBase< CompAlgo, StreamType >::closeTmpFile
protected

◆ openTmpFile()

template<CDPL::Util::CompressionAlgo CompAlgo, typename StreamType >
void CDPL::Util::CompressionStreamBase< CompAlgo, StreamType >::openTmpFile
protected

◆ decompInput()

template<CDPL::Util::CompressionAlgo CompAlgo, typename StreamType >
void CDPL::Util::CompressionStreamBase< CompAlgo, StreamType >::decompInput ( IStreamType is)
protected

◆ compOutput()

template<CDPL::Util::CompressionAlgo CompAlgo, typename StreamType >
void CDPL::Util::CompressionStreamBase< CompAlgo, StreamType >::compOutput ( OStreamType os)
protected

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