XMLPart.h

00001 //
00002 //  Copyright (c) 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, AS TO THE CORRECTNESS
00008 //  OF THIS CODE OR ANY DERIVATIVE WORKS WHICH INCORPORATE IT. AUTODESK
00009 //  PROVIDES THE CODE ON AN "AS-IS" BASIS AND EXPLICITLY DISCLAIMS ANY
00010 //  LIABILITY, INCLUDING CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
00011 //  OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
00012 //
00013 //  Use, duplication, or disclosure by the U.S. Government is subject to
00014 //  restrictions set forth in FAR 52.227-19 (Commercial Computer Software
00015 //  Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
00016 //  Data and Computer Software), as applicable.
00017 //
00018 //  $Header: //DWF/Development/Components/Internal/DWF Toolkit/v7.6/develop/global/src/dwf/opc/XMLPart.h#2 $
00019 //  $DateTime: 2008/10/28 19:48:13 $
00020 //  $Author: gaoje $
00021 //  $Change: 119510 $
00022 //  $Revision: #2 $
00023 //
00024 //
00025 
00026 #ifndef _DWFTK_OPCXMLPART_H
00027 #define _DWFTK_OPCXMLPART_H
00028 
00029 #include "dwf/opc/Part.h"
00030 #include "dwfcore/TempFile.h"
00031 
00032 namespace DWFToolkit
00033 {
00034 
00035 class OPCXMLPart : public OPCPart
00036 {
00037 
00038 public:
00039 
00040     _DWFTK_API
00041     OPCXMLPart()
00042         throw();
00043 
00044     _DWFTK_API
00045     virtual ~OPCXMLPart()
00046         throw();
00047 
00048     _DWFTK_API
00049     virtual DWFInputStream* getInputStream()
00050         throw( DWFException );
00051 
00052         //
00053         // These two interfaces are for extension in the furture.
00054         // Currently, use file as default.
00055         //
00056         _DWFTK_API
00057         virtual void setUseFileStream(bool useFile)
00058         {
00059                 _useFileStream = useFile;
00060         }
00061 
00062         _DWFTK_API
00063         virtual bool getUseFileStream( )
00064         {
00065                 return _useFileStream;
00066         }
00067 
00068 #ifndef DWFTK_READ_ONLY
00069 
00076     _DWFTK_API
00077     virtual void serializeXML( DWFXMLSerializer& rSerializer )
00078         throw( DWFException ) = 0;
00079 
00080 #endif
00081 
00082 protected:
00083 
00084     //
00085     // Buffer to which the XML is written for serialization of this content.
00086     //
00087     char*           _pBuffer;
00088 
00089         //
00090         //      To collect all temp files.
00091         //
00092         std::list<DWFTempFile*>    _lTempFiles; 
00093         //
00094         // A flag to determine if to use TempFile as output and input file stream
00095         // true: use temp file
00096         // false: use buffer stream
00097         //
00098         bool                    _useFileStream;
00099 
00100 };
00101 
00102 }
00103 
00104 #endif

Generated on Tue Jan 6 22:40:06 2009 for Autodesk DWF Toolkit by  doxygen 1.4.5