DWFSection.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/DWFSection.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_DWFXDWFSECTION_H
00027 #define _DWFTK_DWFXDWFSECTION_H
00028 
00029 #include "dwf/opc/XMLPart.h"
00030 #include "dwf/dwfx/ResourcePart.h"
00031 
00032 namespace DWFToolkit
00033 {
00034 
00035 //
00036 // fwd declaration
00037 //
00038 class DWFSection;
00039 
00040 
00041 class DWFXDWFSection : public OPCXMLPart
00042                      , protected DWFOwner
00043 {
00044 
00045 public:
00046 
00050     typedef DWFOrderedVector<DWFXDWFSection*>              tList;
00054     typedef DWFStringKeySkipList<DWFXDWFSection*>          tMap;
00059     typedef DWFCachingIterator<DWFXDWFSection*>            tCachingIterator;
00064     typedef DWFIterator<DWFXDWFSection*>                   tIterator;
00069     typedef DWFConstIterator<DWFXDWFSection*>              tConstIterator;
00070 
00071 public:
00072 
00076     static const char* const kzName;
00077 
00078 public:
00079 
00080     _DWFTK_API
00081     DWFXDWFSection( DWFSection* pSection )
00082         throw( DWFException );
00083 
00084     _DWFTK_API
00085     virtual ~DWFXDWFSection()
00086         throw();
00087 
00088     _DWFTK_API
00089     DWFSection* const section() const
00090         throw()
00091     {
00092         return _pSection;
00093     }
00094 
00098     _DWFTK_API
00099     virtual void setPath( const DWFString& zPath )
00100         throw();
00101 
00102     _DWFTK_API
00103     void addResourcePart( DWFXResourcePart* pResourcePart,
00104                           bool bOwn = true )
00105         throw();
00106 
00107     _DWFTK_API
00108     bool removeResourcePart( DWFXResourcePart* pResourcePart )
00109         throw();
00110 
00111     _DWFTK_API
00112     DWFXResourcePart::tConstIterator* resourceParts() const
00113         throw()
00114     {
00115         return _oResourceParts.constIterator();
00116     }
00117 
00118 #ifndef DWFTK_READ_ONLY
00119 
00120     _DWFTK_API
00121     virtual void serializeXML( DWFXMLSerializer& rSerializer )
00122         throw( DWFException );
00123 
00124 #endif
00125 
00126 protected:
00127 
00128     _DWFTK_API
00129     void notifyOwnableDeletion( DWFOwnable& rOwnable )
00130         throw( DWFException );
00131 
00132 private:
00133 
00134     _DWFTK_API
00135     void _updatePageRels()
00136         throw();
00137 
00138 private:
00139 
00140     DWFSection*             _pSection;
00141     DWFXResourcePart::tList _oResourceParts;
00142 
00143 private:
00144 
00145     //
00146     //  Not implemented
00147     //
00148     DWFXDWFSection( const DWFXDWFSection& pDWFSection );
00149     DWFXDWFSection& operator=( const DWFXDWFSection& pDWFSection );
00150 };
00151 
00152 //
00153 // required for win32 dll external linkage
00154 //
00155 #ifdef  _DWFCORE_WIN32_SYSTEM
00156 #ifndef DWFTK_STATIC
00157 
00158 //DNT_START
00159 _declspec(selectany) const char* const DWFXDWFSection::kzName = "descriptor.xml";
00160 //DNT_END
00161 
00162 #endif
00163 #endif
00164 
00165 
00166 }
00167 
00168 #endif
00169 

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