XMLEncodingOutputStream.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 2003-2006 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 #ifndef _DWFCORE_XML_ENCODING_OUTPUT_STREAM_H
00023 #define _DWFCORE_XML_ENCODING_OUTPUT_STREAM_H
00024 
00025 
00030 
00031 
00032 #include "dwfcore/OutputStream.h"
00033 
00034 
00035 
00036 namespace DWFCore
00037 {
00038 
00047 class DWFXMLEncodingOutputStream : public DWFCoreMemory
00048                                  , public DWFOutputStream
00049 {
00050 
00051 public:
00052 
00071     _DWFCORE_API 
00072     DWFXMLEncodingOutputStream( DWFOutputStream* pOutputStream = NULL,
00073                                 bool             bOwnStream = false,
00074                                 bool             bAlwaysEncodeWideStrings = false )
00075        throw();
00076 
00082     _DWFCORE_API 
00083     virtual ~DWFXMLEncodingOutputStream()
00084         throw();
00085 
00089     _DWFCORE_API 
00090     void flush()
00091         throw( DWFException );
00092 
00096     _DWFCORE_API 
00097     virtual size_t write( const void*   pBuffer,
00098                           size_t        nBytesToWrite )
00099         throw( DWFException );
00100 
00108     _DWFCORE_API 
00109     size_t bytes() const
00110         throw();
00111 
00126     _DWFCORE_API 
00127     void attach( DWFOutputStream* pOutputStream,
00128                  bool             bOwnStream )
00129         throw();
00130 
00137     _DWFCORE_API 
00138     void detach()
00139         throw();
00140 
00141 private:
00142 
00143     DWFOutputStream*    _pOutputStream;
00144     bool                _bOwnStream;
00145     bool                _bAlwaysEncodeWideStrings;
00146     size_t              _nBytesEncoded;
00147 
00148     char*               _pBuffer;
00149     size_t              _nBufferBytes;
00150 
00151 
00152 private:
00153 
00154     //
00155     // Unimplemented methods
00156     //
00157     DWFXMLEncodingOutputStream( const DWFXMLEncodingOutputStream& );
00158     DWFXMLEncodingOutputStream& operator=( const DWFXMLEncodingOutputStream& );
00159 };
00160 
00161 }
00162 
00163 
00164 
00165 #endif

Generated on Tue Jan 6 22:39:29 2009 for Autodesk DWF Core Library by  doxygen 1.4.5