DWFDocumentSequence.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/DWFDocumentSequence.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_DWFDOCUMENTSEQUENCE_H
00027 #define _DWFTK_DWFDOCUMENTSEQUENCE_H
00028 
00029 #include "dwf/opc/XMLPart.h"
00030 #include "dwf/dwfx/Package.h"
00031 #include "dwf/dwfx/DWFDocument.h"
00032 #include "dwf/dwfx/reader/DWFDocumentSequenceReader.h"
00033 
00034 namespace DWFToolkit
00035 {
00036 
00037 class DWFXDWFDocumentSequence : public OPCXMLPart
00038                               , public DWFXDWFDocumentSequenceReader
00039                               , protected DWFOwner
00040 {
00041 
00042 public:
00043 
00047     static const char* const kzName;
00048 
00049 public:
00050 
00051     _DWFTK_API
00052     DWFXDWFDocumentSequence()
00053         throw();
00054 
00055     _DWFTK_API
00056     virtual ~DWFXDWFDocumentSequence()
00057         throw();
00058 
00068     _DWFTK_API
00069     bool addDWFDocument( DWFXDWFDocument* pDWFDocument,
00070                          bool bOwn = true )
00071         throw();
00072 
00086     _DWFTK_API
00087     bool insertDWFDocument( DWFXDWFDocument* pDWFDocument,
00088                             DWFXDWFDocument* pAfterDocument,
00089                             bool bOwn = true )
00090         throw();
00091 
00100     _DWFTK_API
00101     bool removeDWFDocument( DWFXDWFDocument* pDWFDocument )
00102         throw();
00103 
00111     _DWFTK_API
00112     DWFXDWFDocument::tConstIterator* dwfDocuments() const
00113         throw()
00114     {
00115         return _oDWFDocuments.constIterator();
00116     }
00117 
00126     _DWFTK_API
00127     DWFOrderedVector<DWFString>::ConstIterator* dwfDocumentURIs() const
00128         throw()
00129     {
00130         return _oDWFDocumentURIs.constIterator();
00131     }
00132 
00133 #ifndef DWFTK_READ_ONLY
00134 
00135     _DWFTK_API
00136     virtual void serializeXML( DWFXMLSerializer& rSerializer )
00137         throw();
00138 
00139 #endif
00140 
00141     _DWFTK_API
00142     virtual DWFString provideDocumentURI( const DWFString& zDocumentURI )
00143         throw();
00144 
00145 protected:
00146 
00147     _DWFTK_API
00148     virtual void notifyOwnableDeletion( DWFOwnable& rOwnable )
00149         throw( DWFException );
00150 
00151 private:
00152 
00153     DWFXDWFDocument::tList      _oDWFDocuments;
00154 
00155     //
00156     //  This is populated when reading the DWFDocumentSequence, since
00157     //  _oDWFDocuments cannot be populated with actually creating the documents.
00158     //
00159     DWFOrderedVector<DWFString> _oDWFDocumentURIs;
00160 
00161 private:
00162 
00163     //
00164     // Not implemented
00165     //
00166     DWFXDWFDocumentSequence( const DWFXDWFDocumentSequence& );
00167     DWFXDWFDocumentSequence& operator=( const DWFXDWFDocumentSequence& );
00168 
00169 };
00170 
00171 
00172 //
00173 // required for win32 dll external linkage
00174 //
00175 #ifdef  _DWFCORE_WIN32_SYSTEM
00176 #ifndef DWFTK_STATIC
00177 
00178 //DNT_START
00179 _declspec(selectany) const char* const DWFXDWFDocumentSequence::kzName = "DWFDocumentSequence.dwfseq";
00180 //DNT_END
00181 
00182 #endif
00183 #endif
00184 
00185 }
00186 
00187 #endif

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