zipios++  2.0.2
Zipios++ – a small C++ library that provides easy access to .zip files.
Public Member Functions | Private Attributes | List of all members
zipios::ZipInputStream Class Reference

The ZipInputStream to read data from a Zip archive. More...

#include <zipinputstream.hpp>

Inheritance diagram for zipios::ZipInputStream:
Inheritance graph
Collaboration diagram for zipios::ZipInputStream:
Collaboration graph

Public Member Functions

 ZipInputStream (std::string const &filename, std::streampos pos=0)
 Initialize a ZipInputStream from a filename and position. More...
 ZipInputStream (ZipInputStream const &src)=delete
virtual ~ZipInputStream () override
 Clean up the input stream. More...
ZipInputStream const & operator= (ZipInputStream const &src)=delete

Private Attributes

std::unique_ptr< std::ifstream > m_ifs
< ZipInputStreambuf

Detailed Description

ZipInputStream is an istream that gets its input from a zip file. The interface was redesigned in version 2.x to be more C++ like.

The getNextEntry() was removed because we cannot make it work here. The old implementation would let someone read all the local directory entries one after another. Only that is not correct and since this class is not publicly exposed anymore, it wouldn't be available anyway.

Definition at line 43 of file zipinputstream.hpp.

Constructor & Destructor Documentation

zipios::ZipInputStream::ZipInputStream ( std::string const &  filename,
std::streampos  pos = 0 

This constructor creates a ZIP file stream by attaching itself to a file as defined by the specified filename and a position to the header of the file being read.

[in]filenameThe name of a valid zip file.
[in]posposition to reposition the istream to before reading.

Definition at line 62 of file zipinputstream.cpp.

References m_izf.

zipios::ZipInputStream::ZipInputStream ( ZipInputStream const &  src)
zipios::ZipInputStream::~ZipInputStream ( )

The destructor ensures that all resources used by the class get released.

Definition at line 77 of file zipinputstream.cpp.

Member Function Documentation

ZipInputStream const& zipios::ZipInputStream::operator= ( ZipInputStream const &  src)

Member Data Documentation

std::unique_ptr<std::ifstream> zipios::ZipInputStream::m_ifs

Definition at line 52 of file zipinputstream.hpp.

std::unique_ptr<ZipInputStreambuf> zipios::ZipInputStream::m_izf

Definition at line 53 of file zipinputstream.hpp.

Referenced by ZipInputStream().

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