2 #include "zipios++/zipios-config.h"
4 #include "zipios++/meta-iostreams.h"
6 #include "zipios++/zipinputstreambuf.h"
7 #include "zipios++/zipinputstream.h"
13 ZipInputStream::ZipInputStream( std::istream &is, std::streampos pos )
15 // SGIs basic_ifstream calls istream with 0, but calls basic_ios constructor first??
18 izf = new ZipInputStreambuf( is.rdbuf(), static_cast< int >( pos ) ) ;
19 // this->rdbuf( izf ) ; is replaced by:
23 ZipInputStream::ZipInputStream( const std::string &filename, std::streampos pos )
27 ifs = new std::ifstream( filename.c_str(), std::ios::in |std:: ios::binary ) ;
28 izf = new ZipInputStreambuf( ifs->rdbuf(), static_cast< int >( pos ) ) ;
29 // this->rdbuf( izf ) ; is replaced by:
33 int ZipInputStream::available() {
34 return 1 ; // FIXME: Dummy implementation
37 void ZipInputStream::closeEntry() {
41 void ZipInputStream::close() {
45 // ZipLocalEntry *ZipInputStream::createZipCDirEntry( const string
48 ConstEntryPointer ZipInputStream::getNextEntry() {
49 clear() ; // clear eof and other flags.
50 return izf->getNextEntry() ;
53 ZipInputStream::~ZipInputStream() {
54 // It's ok to call delete with a Null pointer.
62 Implementation of ZipInputStream.
66 Zipios++ - a small C++ library that provides easy access to .zip files.
67 Copyright (C) 2000 Thomas Søndergaard
69 This library is free software; you can redistribute it and/or
70 modify it under the terms of the GNU Lesser General Public
71 License as published by the Free Software Foundation; either
72 version 2 of the License, or (at your option) any later version.
74 This library is distributed in the hope that it will be useful,
75 but WITHOUT ANY WARRANTY; without even the implied warranty of
76 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
77 Lesser General Public License for more details.
79 You should have received a copy of the GNU Lesser General Public
80 License along with this library; if not, write to the Free Software
81 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA