Zipios++
gzipoutputstream.h
Go to the documentation of this file.
00001 #ifndef GZIPOUTPUTSTREAM_H
00002 #define GZIPOUTPUTSTREAM_H
00003 
00004 #include "zipios++/zipios-config.h"
00005 
00006 #include "zipios++/meta-iostreams.h"
00007 
00008 #include <string>
00009 
00010 #include "zipios++/gzipoutputstreambuf.h"
00011 
00012 namespace zipios {
00013 
00017 class GZIPOutputStream : public std::ostream {
00018 public:
00019 
00023   explicit GZIPOutputStream( std::ostream &os ) ;
00024 
00027   explicit GZIPOutputStream( const std::string &filename ) ;
00028 
00029   void setFilename( const string &filename );
00030   void setComment( const string &comment );
00031   
00033   void close() ;
00034 
00036   void finish() ;
00037 
00039   virtual ~GZIPOutputStream() ;
00040 
00041 private:
00042   std::ofstream *ofs ;
00043   GZIPOutputStreambuf *ozf ;
00044 };
00045  
00046 } // namespace.
00047 
00048 #endif
00049 
00054 /*
00055   Zipios++ - a small C++ library that provides easy access to .zip files.
00056   Copyright (C) 2000  Thomas Søndergaard
00057   
00058   This library is free software; you can redistribute it and/or
00059   modify it under the terms of the GNU Lesser General Public
00060   License as published by the Free Software Foundation; either
00061   version 2 of the License, or (at your option) any later version.
00062   
00063   This library is distributed in the hope that it will be useful,
00064   but WITHOUT ANY WARRANTY; without even the implied warranty of
00065   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00066   Lesser General Public License for more details.
00067   
00068   You should have received a copy of the GNU Lesser General Public
00069   License along with this library; if not, write to the Free Software
00070   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00071 */