Main Page   Class Hierarchy   Compound List   File List   Compound Members  

zipinputstreambuf.h

Go to the documentation of this file.
00001 #ifndef ZIPINPUTSTREAMBUF_H
00002 #define ZIPINPUTSTREAMBUF_H
00003 
00004 #include "zipios++/zipios-config.h"
00005 
00006 #include <vector>
00007 
00008 #include <zlib.h>
00009 
00010 #include "zipios++/fcoll.h"
00011 #include "zipios++/inflateinputstreambuf.h"
00012 #include "zipios++/ziphead.h"
00013 
00014 namespace zipios {
00015 
00018 class ZipInputStreambuf : public InflateInputStreambuf {
00019 public:
00027   explicit ZipInputStreambuf( streambuf *inbuf, int s_pos = -1, bool del_inbuf = false ) ;
00028 
00031   void closeEntry() ;
00033   void close() ;
00034 
00040   ConstEntryPointer getNextEntry() ;
00041 
00043   virtual ~ZipInputStreambuf() ;
00044 protected:
00045   virtual int underflow() ;
00046 private:
00047   bool _open_entry ;
00048   ZipLocalEntry _curr_entry ;
00049   int _data_start ; // Don't forget entry header has a length too.
00050   int _remain ; // For STORED entry only. the number of bytes that
00051   // hasn't been put in the _outvec yet.
00052 
00054   ZipInputStreambuf( const ZipInputStreambuf &src ) ;
00055 
00057   const ZipInputStreambuf &operator= ( const ZipInputStreambuf &src ) ;
00058 
00059 };
00060 
00061 
00062 } // namespace
00063 
00064 
00065 
00066 #endif
00067 
00072 /*
00073   Zipios++ - a small C++ library that provides easy access to .zip files.
00074   Copyright (C) 2000  Thomas Søndergaard
00075   
00076   This library is free software; you can redistribute it and/or
00077   modify it under the terms of the GNU Lesser General Public
00078   License as published by the Free Software Foundation; either
00079   version 2 of the License, or (at your option) any later version.
00080   
00081   This library is distributed in the hope that it will be useful,
00082   but WITHOUT ANY WARRANTY; without even the implied warranty of
00083   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00084   Lesser General Public License for more details.
00085   
00086   You should have received a copy of the GNU Lesser General Public
00087   License along with this library; if not, write to the Free Software
00088   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00089 */

Generated at Tue Aug 14 20:39:26 2001 for Zipios++ by doxygen1.2.0 written by Dimitri van Heesch, © 1997-2000