DWFDocument.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/dwfx/DWFDocument.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_DWFDOCUMENT_H
00027 #define _DWFTK_DWFDOCUMENT_H
00028 
00029 #include "dwfcore/Owner.h"
00030 using namespace DWFCore;
00031 
00032 #include "dwf/opc/XMLPart.h"
00033 #include "dwf/dwfx/ContentPart.h"
00034 #include "dwf/dwfx/DocumentPresentationsPart.h"
00035 #include "dwf/dwfx/DWFSection.h"
00036 
00037 namespace DWFToolkit
00038 {
00039 
00040 //
00041 // fwd declaration
00042 //
00043 class DWFManifest;
00044 class DWFXDWFProperties;
00045 class DWFXCustomProperties;
00046 
00047 class DWFXDWFDocument : public OPCXMLPart
00048                       , protected DWFOwner
00049 {
00050 
00051 public:
00052 
00056     typedef DWFOrderedVector<DWFXDWFDocument*>              tList;
00060     typedef DWFStringKeySkipList<DWFXDWFDocument*>          tMap;
00065     typedef DWFCachingIterator<DWFXDWFDocument*>            tCachingIterator;
00070     typedef DWFIterator<DWFXDWFDocument*>                   tIterator;
00075     typedef DWFConstIterator<DWFXDWFDocument*>              tConstIterator;
00076 
00077 public:
00078 
00082     static const char* const kzName;
00083 
00084 public:
00085 
00086     _DWFTK_API
00087     DWFXDWFDocument( DWFManifest* pManifest )
00088         throw( DWFException );
00089 
00090     _DWFTK_API
00091     virtual ~DWFXDWFDocument()
00092         throw();
00093 
00094     _DWFTK_API
00095     void addContentPart( DWFXContentPart* pContentPart, 
00096                          bool bOwn = true )
00097         throw();
00098 
00099     _DWFTK_API
00100     bool removeContentPart( DWFXContentPart* pContentPart )
00101         throw();
00102 
00103     _DWFTK_API
00104     void addDocumentPresentationsPart( DWFXDocumentPresentationsPart* pPresentationPart, 
00105                                        bool bOwn = true )
00106         throw();
00107 
00108     _DWFTK_API
00109     bool removeDocumentPresentationsPart()
00110         throw();
00111 
00112     _DWFTK_API
00113     void addDWFSection( DWFXDWFSection* pSection,
00114                         bool bOwn = true )
00115         throw();
00116 
00117     _DWFTK_API
00118     bool removeDWFSection( DWFXDWFSection* pSection )
00119         throw();
00120     
00121 
00122     _DWFTK_API
00123     DWFManifest* const manifest() const
00124         throw()
00125     {
00126         return _pManifest;
00127     }
00128 
00129     _DWFTK_API
00130     DWFXContentPart::tConstIterator* contentParts() const
00131         throw()
00132     {
00133         return _oContentParts.constIterator();
00134     }
00135 
00136     _DWFTK_API
00137     DWFXDocumentPresentationsPart* const documentPresentationsPart() const
00138         throw()
00139     {
00140         return _pPresentationsPart;
00141     }
00142 
00143     _DWFTK_API
00144     DWFXDWFSection::tConstIterator* dwfSections() const
00145     {
00146         return _oDWFSections.constIterator();
00147     }
00148 
00158     _DWFTK_API
00159     void virtual setDWFProperties( DWFXDWFProperties* pDWFProperties,
00160                                    bool bOwn = true )
00161         throw( DWFException );
00162 
00169     _DWFTK_API
00170     DWFXDWFProperties* const dwfProperties() const
00171         throw()
00172     {
00173         return _pDWFProperties;
00174     }
00175 
00185     _DWFTK_API
00186     void virtual setCustomProperties( DWFXCustomProperties* pCustomProperties,
00187                                       bool bOwn = true )
00188         throw( DWFException );
00189 
00196     _DWFTK_API
00197     DWFXCustomProperties* const customProperties() const
00198         throw()
00199     {
00200         return _pCustomProperties;
00201     }    
00202 
00203 #ifndef DWFTK_READ_ONLY
00204 
00205     _DWFTK_API
00206     virtual void serializeXML( DWFXMLSerializer& rSerializer )
00207         throw( DWFException );
00208 
00209 #endif
00210 
00211 protected:
00212 
00213     _DWFTK_API
00214     void notifyOwnableDeletion( DWFOwnable& rOwnable )
00215         throw( DWFException );
00216 
00217 private:
00218 
00219     DWFManifest*                    _pManifest;
00220     DWFXDWFProperties*              _pDWFProperties;
00221     DWFXCustomProperties*           _pCustomProperties;
00222 
00223     DWFXContentPart::tList          _oContentParts;
00224     DWFXDocumentPresentationsPart*  _pPresentationsPart;
00225 
00226     DWFXDWFSection::tList           _oDWFSections;
00227 
00228 private:
00229 
00230     //
00231     // Not implemented
00232     //
00233     DWFXDWFDocument( const DWFXDWFDocument& );
00234     DWFXDWFDocument& operator=( const DWFXDWFDocument& );
00235 
00236 };
00237 
00238 //
00239 // required for win32 dll external linkage
00240 //
00241 #ifdef  _DWFCORE_WIN32_SYSTEM
00242 #ifndef DWFTK_STATIC
00243 
00244 //DNT_START
00245 _declspec(selectany) const char* const DWFXDWFDocument::kzName = "manifest.xml";
00246 //DNT_END
00247 
00248 #endif
00249 #endif
00250 
00251 
00252 }
00253 
00254 #endif

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