dwfx/Package.h

Go to the documentation of this file.
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/dwfx/Package.h#1 $
00019 //  $DateTime: 2008/02/20 08:38:28 $
00020 //  $Author: appacsviewers $
00021 //  $Change: 84992 $
00022 //  $Revision: #1 $
00023 //
00024 //
00025 
00026 #ifndef _DWFTK_DWFXPACKAGE_H
00027 #define _DWFTK_DWFXPACKAGE_H
00028 
00033 
00034 #include "dwf/xps/Package.h"
00035 
00036 namespace DWFToolkit
00037 {
00038 
00039 //
00040 //  fwd declaration
00041 //
00042 class DWFXDWFDocumentSequence;
00043 class DWFXResourcePart;
00044 class DWFResource;
00045 
00046 class DWFXPackage : public XPSPackage
00047 {
00048 
00049 public:
00050 
00056     _DWFTK_API
00057     DWFXPackage()
00058         throw( DWFException );
00059 
00065     _DWFTK_API
00066     virtual ~DWFXPackage()
00067         throw();
00068 
00080     _DWFTK_API
00081     DWFXDWFDocumentSequence* setDWFDocumentSequence( DWFXDWFDocumentSequence* pDWFDocumentSequence, 
00082                                                      bool bOwn = true )
00083         throw();
00084 
00092     _DWFTK_API
00093     DWFXDWFDocumentSequence* const dwfDocumentSequence() const
00094         throw()
00095     {
00096         return _pDWFDocumentSequence;
00097     }
00098 
00099 #ifndef DWFTK_READ_ONLY
00100 
00101     _DWFTK_API
00102     virtual void serialize( OPCPhysicalLayerWriter& rWriter )
00103         throw( DWFException );
00104 
00105 #endif
00106 
00107 private:
00108 
00109 #ifndef DWFTK_READ_ONLY
00110 
00111     //
00112     //  Ensure URIs are set and valid. Also add the parts to the OPC PartContainer aspect of
00113     //  the package for OPC based serialization. Update the package ContentTypes during
00114     //  the traversal of the container heirarchy.
00115     //
00116     void _updateURIsAndOPCContainment()
00117         throw( DWFException );
00118 
00119     //
00120     //  Factoring out the code to update the URI of the ResourcePart, and update the 
00121     //  ContentTypes from them.
00122     //
00123     void _updateResourcePartInfo( DWFXResourcePart* pPart,
00124                                   const DWFString& zPath,
00125                                   DWFUUID& uuidGenerator )
00126         throw( DWFException );
00127 
00128     //
00129     //  The internal IDs of the resource are package unique and are set
00130     //  during 
00131     //
00132     void _updateInternalID( DWFResource* pResource )
00133         throw( DWFException );
00134 
00135 #endif
00136 
00137 private:
00138 
00139     DWFXDWFDocumentSequence*    _pDWFDocumentSequence;
00140 
00141     unsigned int                _nResourceInternalID;
00142 
00143 private:
00144 
00145     //
00146     //  Not implemented
00147     //
00148     DWFXPackage( const DWFXPackage& );
00149     DWFXPackage& operator=( const DWFXPackage& );
00150 
00151 };
00152 
00153 }
00154 
00155 #endif

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