libzypp 17.37.10

zypp::detail::fXstream< TBStream, TStreamBuf > Class Template Reference

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

`#include <zypp-core/base/fxstream.h>`

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

## Public Types
using | ZlibError = typename TStreamBuf::error_type
using | stream_type = TBStream
using | streambuf_type = TStreamBuf

## 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 from zlib.
const streambuf_type & | getbuf () const

## Private Member Functions
std::ios_base::openmode | defMode (const std::istream &)
std::ios_base::openmode | defMode (const std::ostream &)

## Private Attributes
streambuf_type | _streambuf

## Detailed Description

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

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

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

Definition at line 26 of file fxstream.h.

## Member Typedef Documentation

## ◆ ZlibError

template<class TBStream, class TStreamBuf>

using zypp::detail::fXstream< TBStream, TStreamBuf >::ZlibError = typename TStreamBuf::error_type

Definition at line 30 of file fxstream.h.

## ◆ stream_type

template<class TBStream, class TStreamBuf>

using zypp::detail::fXstream< TBStream, TStreamBuf >::stream_type = TBStream

Definition at line 31 of file fxstream.h.

## ◆ streambuf_type

template<class TBStream, class TStreamBuf>

using zypp::detail::fXstream< TBStream, TStreamBuf >::streambuf_type = TStreamBuf

Definition at line 32 of file fxstream.h.

## Constructor & Destructor Documentation

## ◆ fXstream() [1/2]

template<class TBStream, class TStreamBuf>

zypp::detail::fXstream< TBStream, TStreamBuf >::fXstream | ( |  | ) |
| inline

Definition at line 34 of file fxstream.h.

## ◆ fXstream() [2/2]

template<class TBStream, class TStreamBuf>

zypp::detail::fXstream< TBStream, TStreamBuf >::fXstream | ( | const char * | file_r | ) |
| inline explicit

Definition at line 39 of file fxstream.h.

## ◆ ~fXstream()

template<class TBStream, class TStreamBuf>

virtual zypp::detail::fXstream< TBStream, TStreamBuf >::~fXstream | ( |  | ) |
| inline virtual

Definition at line 44 of file fxstream.h.

## Member Function Documentation

## ◆ is_open()

template<class TBStream, class TStreamBuf>

bool zypp::detail::fXstream< TBStream, TStreamBuf >::is_open | ( |  | ) | const
| inline

Definition at line 48 of file fxstream.h.

## ◆ open()

template<class TBStream, class TStreamBuf>

void zypp::detail::fXstream< TBStream, TStreamBuf >::open | ( | const char * | file_r | ) |
| inline

Definition at line 52 of file fxstream.h.

## ◆ close()

template<class TBStream, class TStreamBuf>

void zypp::detail::fXstream< TBStream, TStreamBuf >::close | ( |  | ) |
| inline

Definition at line 61 of file fxstream.h.

## ◆ zError()

template<class TBStream, class TStreamBuf>

ZlibError zypp::detail::fXstream< TBStream, TStreamBuf >::zError | ( |  | ) | const
| inline

The last error returned retuned from zlib.

Definition at line 71 of file fxstream.h.

## ◆ getbuf()

template<class TBStream, class TStreamBuf>

const streambuf_type & zypp::detail::fXstream< TBStream, TStreamBuf >::getbuf | ( |  | ) | const
| inline

Similar to ios::rdbuf. But it returns our specific type, not the generic streambuf *.

Definition at line 77 of file fxstream.h.

## ◆ defMode() [1/2]

template<class TBStream, class TStreamBuf>

std::ios_base::openmode zypp::detail::fXstream< TBStream, TStreamBuf >::defMode | ( | const std::istream & |  | ) |
| inline private

Definition at line 85 of file fxstream.h.

## ◆ defMode() [2/2]

template<class TBStream, class TStreamBuf>

std::ios_base::openmode zypp::detail::fXstream< TBStream, TStreamBuf >::defMode | ( | const std::ostream & |  | ) |
| inline private

Definition at line 89 of file fxstream.h.

## Member Data Documentation

## ◆ _streambuf

template<class TBStream, class TStreamBuf>

streambuf_type zypp::detail::fXstream< TBStream, TStreamBuf >::_streambuf
| private

Definition at line 82 of file fxstream.h.

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

- zypp-core/base/fxstream.h