Template Class basic_istream

Inheritance Relationships

Base Type

  • public std::basic_istream< CharT, Traits >

Derived Type

Class Documentation

template<typename CharT, typename Traits>
class basic_istream : public std::basic_istream<CharT, Traits>

An istream implementation that wraps a streambuf with a decompressing streambuf.

This is an istream implementation that can take a source streambuf and then wraps this streambuf with a decompressing streambuf class defined above. The class inherits from std::basic_istream and offers all the associated functionality.

Template Parameters
  • CharT – Type of the character stream.

  • Traits – Traits for character type, defaults to char_traits<_CharT>.

Subclassed by cif::gzio::basic_ifstream< CharT, Traits >

Public Functions

inline basic_istream(basic_istream &&rhs)

Regular move constructor.

inline basic_istream &operator=(basic_istream &&rhs)

Regular move operator=.

inline explicit basic_istream(upstreambuf_type *buf)

Construct an istream with the passed in streambuf buf.

This constructor will initialize the zlib code with the buf streambuf.

Parameters

buf – The streambuf that provides the compressed data

Protected Functions

inline basic_istream()
inline void init_z(upstreambuf_type *sb)

Initialise internals with streambuf sb.

This will sniff the content in sb and decide upon what is found what implementation is used. If it doesn’t look like compressed data the sb streambuf is used without any decompression being done.

Parameters

sb – The upstream streambuf class

Protected Attributes

std::unique_ptr<z_streambuf_type> m_gziobuf

Our streambuf class.