Zipios++
|
00001 #ifndef ZIPOUTPUTSTREAM_H 00002 #define ZIPOUTPUTSTREAM_H 00003 00004 #include "zipios++/zipios-config.h" 00005 00006 #include "zipios++/meta-iostreams.h" 00007 00008 #include <string> 00009 00010 #include "zipios++/ziphead.h" 00011 #include "zipios++/zipoutputstreambuf.h" 00012 00013 namespace zipios { 00014 00018 class ZipOutputStream : public std::ostream { 00019 public: 00020 00024 explicit ZipOutputStream( std::ostream &os ) ; 00025 00028 explicit ZipOutputStream( const std::string &filename ) ; 00029 00034 void closeEntry() ; 00035 00040 void close() ; 00041 00046 void finish() ; 00047 00051 void putNextEntry( const ZipCDirEntry &entry ) ; 00052 00056 void putNextEntry(const std::string& entryName); 00057 00059 void setComment( const std::string& comment ) ; 00060 00062 void setLevel( int level ) ; 00063 00066 void setMethod( StorageMethod method ) ; 00067 00069 virtual ~ZipOutputStream() ; 00070 00071 private: 00072 std::ofstream *ofs ; 00073 ZipOutputStreambuf *ozf ; 00074 }; 00075 00076 } // namespace. 00077 00078 #endif 00079 00084 /* 00085 Zipios++ - a small C++ library that provides easy access to .zip files. 00086 Copyright (C) 2000 Thomas Søndergaard 00087 00088 This library is free software; you can redistribute it and/or 00089 modify it under the terms of the GNU Lesser General Public 00090 License as published by the Free Software Foundation; either 00091 version 2 of the License, or (at your option) any later version. 00092 00093 This library is distributed in the hope that it will be useful, 00094 but WITHOUT ANY WARRANTY; without even the implied warranty of 00095 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00096 Lesser General Public License for more details. 00097 00098 You should have received a copy of the GNU Lesser General Public 00099 License along with this library; if not, write to the Free Software 00100 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00101 */