Zipios++
zipinputstream.h
Go to the documentation of this file.
1 #ifndef ZIPINPUTSTREAM_H
2 #define ZIPINPUTSTREAM_H
3 
4 #include "zipios++/zipios-config.h"
5 
6 #include "zipios++/meta-iostreams.h"
7 #include <string>
8 
9 #include "zipios++/ziphead.h"
11 
12 namespace zipios {
13 
14 using std::ifstream ;
15 
20 class ZipInputStream : public istream {
21 public:
22 
26  explicit ZipInputStream( istream &is, streampos pos = 0 ) ;
27 
31  explicit ZipInputStream( const string &filename, streampos pos = 0 ) ;
32 
33  int available() ;
36  void closeEntry() ;
37 
39  void close() ;
40 
41 // ZipLocalEntry *createZipCDirEntry( const string &name ) ;
42 
51 
53  virtual ~ZipInputStream() ;
54 
55 private:
56  ifstream *ifs ;
57  ZipInputStreambuf *izf ;
58 
60  ZipInputStream( const ZipInputStream &src ) ;
61 
63  const ZipInputStream &operator= ( const ZipInputStream &src ) ;
64 
65 };
66 
67 } // namespace.
68 
69 #endif
70 
75 /*
76  Zipios++ - a small C++ library that provides easy access to .zip files.
77  Copyright (C) 2000 Thomas Søndergaard
78 
79  This library is free software; you can redistribute it and/or
80  modify it under the terms of the GNU Lesser General Public
81  License as published by the Free Software Foundation; either
82  version 2 of the License, or (at your option) any later version.
83 
84  This library is distributed in the hope that it will be useful,
85  but WITHOUT ANY WARRANTY; without even the implied warranty of
86  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
87  Lesser General Public License for more details.
88 
89  You should have received a copy of the GNU Lesser General Public
90  License along with this library; if not, write to the Free Software
91  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
92 */
SimpleSmartPointer is a simple reference counting smart pointer template.
void closeEntry()
Closes the current entry, and positions the stream read pointer at the beginning of the next entry (i...
Header file containing classes and functions for reading the central directory and local header field...
virtual ~ZipInputStream()
Destructor.
Header file that defines ZipInputStreambuf.
ConstEntryPointer getNextEntry()
ZipInputStreambuf is a zip input streambuf filter.
void close()
Closes the istream.
ZipInputStream(istream &is, streampos pos=0)
ZipInputStream constructor.