libzypp  17.8.0
zypp::gzstream_detail::fXstream< TBStream, TStreamBuf > Class Template Reference

Common template to define ifgzstream/ofgzstream reading/writing gzip files. More...

#include <GzStream.h>

Inheritance diagram for zypp::gzstream_detail::fXstream< TBStream, TStreamBuf >:

Public Types

typedef gzstream_detail::ZlibError ZlibError
 
typedef TBStream stream_type
 
typedef TStreamBuf streambuf_type
 

Public Member Functions

 fXstream ()
 
 fXstream (const char *file_r)
 
virtual ~fXstream ()
 
bool is_open () const
 
void open (const char *file_r)
 
void close ()
 
ZlibError zError () const
 The last error returned retuned fron zlib. More...
 
const streambuf_typegetbuf () const
 Similar to ios::rdbuf. More...
 

Private Member Functions

std::ios_base::openmode defMode (const std::istream &str_r)
 
std::ios_base::openmode defMode (const std::ostream &str_r)
 

Private Attributes

streambuf_type _streambuf
 

Detailed Description

template<class TBStream, class TStreamBuf>
class zypp::gzstream_detail::fXstream< TBStream, TStreamBuf >

Common template to define ifgzstream/ofgzstream reading/writing gzip files.

Don't use fXstream directly, but ifgzstream or ofgzstream. fXstream is just to avoid almost duplicate code.

Definition at line 199 of file GzStream.h.

Member Typedef Documentation

◆ ZlibError

template<class TBStream , class TStreamBuf >
typedef gzstream_detail::ZlibError zypp::gzstream_detail::fXstream< TBStream, TStreamBuf >::ZlibError

Definition at line 203 of file GzStream.h.

◆ stream_type

template<class TBStream , class TStreamBuf >
typedef TBStream zypp::gzstream_detail::fXstream< TBStream, TStreamBuf >::stream_type

Definition at line 204 of file GzStream.h.

◆ streambuf_type

template<class TBStream , class TStreamBuf >
typedef TStreamBuf zypp::gzstream_detail::fXstream< TBStream, TStreamBuf >::streambuf_type

Definition at line 205 of file GzStream.h.

Constructor & Destructor Documentation

◆ fXstream() [1/2]

template<class TBStream , class TStreamBuf >
zypp::gzstream_detail::fXstream< TBStream, TStreamBuf >::fXstream ( )
inline

Definition at line 207 of file GzStream.h.

◆ fXstream() [2/2]

template<class TBStream , class TStreamBuf >
zypp::gzstream_detail::fXstream< TBStream, TStreamBuf >::fXstream ( const char *  file_r)
inlineexplicit

Definition at line 212 of file GzStream.h.

◆ ~fXstream()

template<class TBStream , class TStreamBuf >
virtual zypp::gzstream_detail::fXstream< TBStream, TStreamBuf >::~fXstream ( )
inlinevirtual

Definition at line 217 of file GzStream.h.

Member Function Documentation

◆ is_open()

template<class TBStream , class TStreamBuf >
bool zypp::gzstream_detail::fXstream< TBStream, TStreamBuf >::is_open ( ) const
inline

Definition at line 221 of file GzStream.h.

◆ open()

template<class TBStream , class TStreamBuf >
void zypp::gzstream_detail::fXstream< TBStream, TStreamBuf >::open ( const char *  file_r)
inline

Definition at line 225 of file GzStream.h.

◆ close()

template<class TBStream , class TStreamBuf >
void zypp::gzstream_detail::fXstream< TBStream, TStreamBuf >::close ( )
inline

Definition at line 234 of file GzStream.h.

◆ zError()

template<class TBStream , class TStreamBuf >
ZlibError zypp::gzstream_detail::fXstream< TBStream, TStreamBuf >::zError ( ) const
inline

The last error returned retuned fron zlib.

Definition at line 244 of file GzStream.h.

◆ getbuf()

template<class TBStream , class TStreamBuf >
const streambuf_type& zypp::gzstream_detail::fXstream< TBStream, TStreamBuf >::getbuf ( ) const
inline

Similar to ios::rdbuf.

But it returns our specific type, not the generic streambuf *.

Definition at line 250 of file GzStream.h.

◆ defMode() [1/2]

template<class TBStream , class TStreamBuf >
std::ios_base::openmode zypp::gzstream_detail::fXstream< TBStream, TStreamBuf >::defMode ( const std::istream &  str_r)
inlineprivate

Definition at line 258 of file GzStream.h.

◆ defMode() [2/2]

template<class TBStream , class TStreamBuf >
std::ios_base::openmode zypp::gzstream_detail::fXstream< TBStream, TStreamBuf >::defMode ( const std::ostream &  str_r)
inlineprivate

Definition at line 262 of file GzStream.h.

Member Data Documentation

◆ _streambuf

template<class TBStream , class TStreamBuf >
streambuf_type zypp::gzstream_detail::fXstream< TBStream, TStreamBuf >::_streambuf
private

Definition at line 255 of file GzStream.h.


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