FileOutputStream.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 
00023 #ifndef _DWFCORE_FILE_OUTPUT_STREAM_H
00024 #define _DWFCORE_FILE_OUTPUT_STREAM_H
00025 
00030 
00031 
00032 #include "dwfcore/OutputStream.h"
00033 #include "dwfcore/FileDescriptor.h"
00034 
00035 
00036 namespace DWFCore
00037 {
00038 
00044 class DWFFileOutputStream : virtual public DWFCoreMemory
00045                           , public DWFOutputStream
00046 {
00047 
00048 public:
00049 
00055     _DWFCORE_API
00056     DWFFileOutputStream()
00057         throw();
00058 
00064     _DWFCORE_API
00065     virtual ~DWFFileOutputStream()
00066         throw();
00067 
00080     _DWFCORE_API
00081     void attach( DWFFileDescriptor* pFileDescriptor,
00082                  bool               bOwnDescriptor )
00083         throw( DWFException );
00084 
00090     _DWFCORE_API 
00091     void detach()
00092         throw( DWFException );
00093 
00099     _DWFCORE_API void flush()
00100         throw( DWFException );
00101 
00110     _DWFCORE_API 
00111     size_t write( const void*   pBuffer,
00112                   size_t        nBytesToWrite )
00113         throw( DWFException );
00114 
00121     _DWFCORE_API
00122     const DWFFileDescriptor* descriptor() const
00123         throw()
00124     {
00125         return _pFileDescriptor;
00126     }
00127 
00128 
00129 private:
00130 
00131     bool               _bOwner;
00132     DWFFileDescriptor* _pFileDescriptor;
00133 
00134 private:
00135 
00136     //
00137     // Unimplemented methods
00138     //
00139 
00140     DWFFileOutputStream( const DWFFileOutputStream& );
00141     DWFFileOutputStream& operator=( const DWFFileOutputStream& );
00142 };
00143 
00144 }
00145 
00146 
00147 
00148 #endif

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