Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

ZippingOutputStream.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 2003-2005 by Autodesk, Inc.
00003 //
00004 //  By using this code, you are agreeing to the terms and conditions of
00005 //  the License Agreement included in the documentation for this code.
00006 //
00007 //  AUTODESK MAKES NO WARRANTIES, EXPRESS OR IMPLIED,
00008 //  AS TO THE CORRECTNESS OF THIS CODE OR ANY DERIVATIVE
00009 //  WORKS WHICH INCORPORATE IT.
00010 //
00011 //  AUTODESK PROVIDES THE CODE ON AN "AS-IS" BASIS
00012 //  AND EXPLICITLY DISCLAIMS ANY LIABILITY, INCLUDING
00013 //  CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
00014 //  OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
00015 //
00016 //  Use, duplication, or disclosure by the U.S. Government is subject to
00017 //  restrictions set forth in FAR 52.227-19 (Commercial Computer Software
00018 //  Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
00019 //  Data and Computer Software), as applicable.
00020 //
00021 
00022 
00023 #ifndef _DWFCORE_ZIPPING_OUTPUT_STREAM_H
00024 #define _DWFCORE_ZIPPING_OUTPUT_STREAM_H
00025 
00030 
00031 #include "dwfcore/String.h"
00032 #include "dwfcore/OutputStream.h"
00033 #include "dwfcore/ZipFileDescriptor.h"
00034 
00035 
00036 
00037 namespace DWFCore
00038 {
00039 
00046 class DWFZippingOutputStream : public DWFCoreMemory
00047                              , public DWFOutputStream
00048 {
00049 
00050 public:
00051 
00063     _DWFCORE_API
00064     DWFZippingOutputStream( zipFile                            pZipStream,
00065                             DWFZipFileDescriptor::teFileMode   eZipMode )
00066         throw();
00067 
00073     _DWFCORE_API 
00074     virtual ~DWFZippingOutputStream()
00075         throw();
00076 
00084     _DWFCORE_API 
00085     void open( const DWFString& zArchiveFile,
00086                const DWFString& zPassword = "" )
00087         throw( DWFException );
00088 
00092     _DWFCORE_API 
00093     void flush()
00094         throw( DWFException );
00095 
00099     _DWFCORE_API 
00100     size_t write( const void*   pBuffer,
00101                   size_t        nBytesToWrite )
00102         throw( DWFException );
00103 
00104 private:
00105 
00106     bool                                _bFileOpen;
00107     zipFile                             _pZipStream;
00108     DWFZipFileDescriptor::teFileMode    _eZipMode;
00109 
00110 private:
00111 
00112     //
00113     // Unimplemented methods
00114     //
00115 
00116     DWFZippingOutputStream( const DWFZippingOutputStream& );
00117     DWFZippingOutputStream& operator=( const DWFZippingOutputStream& );
00118 };
00119 
00120 }
00121 
00122 
00123 
00124 #endif

Generated on Tue May 17 12:05:10 2005 for Autodesk DWF Core Library by  doxygen 1.4.1