zipoutputstream.h

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

Generated on Wed Nov 23 19:01:12 2011 for FreeCAD by  doxygen 1.6.1