Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages | Examples

CustomSection.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 1996-2005 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 
00019 
00020 #ifndef _DWFTK_CUSTOM_SECTION_H
00021 #define _DWFTK_CUSTOM_SECTION_H
00022 
00027 
00028 
00029 #include "dwfcore/STL.h"
00030 
00031 #include "dwf/Toolkit.h"
00032 #include "dwf/package/Section.h"
00033 
00034 namespace DWFToolkit
00035 {
00036 
00044 class DWFCustomSection : public DWFSection
00045 {
00046 
00047 public:
00048 
00054     typedef struct
00055     {
00062         bool    bRenameOnPublish;
00063 
00070         bool    bPublishDescriptor;
00071 
00072     } tBehavior;
00073 
00077     typedef vector<DWFCustomSection*>                                         tList;
00081     typedef DWFWCharKeySkipList<DWFCustomSection*>                            tMap;
00085     typedef multimap<const wchar_t*, DWFCustomSection*, tDWFWCharCompareLess> tMultiMap;
00086 
00087 public:
00088 
00094     class Factory : public DWFSection::Factory
00095     {
00096 
00097     public:
00098 
00102         typedef vector<DWFCustomSection::Factory*>                tList;
00106         typedef DWFWCharKeySkipList<DWFCustomSection::Factory*>   tMap;
00107 
00108     public:
00109 
00116         _DWFTK_API
00117         Factory( const DWFString& zType )
00118             throw();
00119 
00125         _DWFTK_API
00126         virtual ~Factory()
00127             throw();
00128 
00132         //_DWFTK_API
00133         //const DWFString& type() const
00134         //    throw();
00135 
00139         _DWFTK_API
00140         virtual DWFSection* build( const DWFString&     zName,
00141                                    const DWFString&     zTitle,
00142                                    DWFPackageReader*    pPackageReader )
00143             throw( DWFException );
00144 
00148         _DWFTK_API
00149         virtual DWFSection* build( const DWFString&     zType,
00150                                    const DWFString&     zName,
00151                                    const DWFString&     zTitle,
00152                                    DWFPackageReader*    pPackageReader )
00153             throw( DWFException );
00154 
00155     private:
00156 
00157         DWFString _zType;
00158     };
00159 
00160 public:
00161 
00174     _DWFTK_API
00175     DWFCustomSection( DWFPackageReader* pPackageReader )
00176         throw();
00177 
00193     _DWFTK_API
00194     DWFCustomSection( const DWFString&  zType,
00195                       const DWFString&  zName,
00196                       const DWFString&  zTitle,
00197                       DWFPackageReader* pPackageReader )
00198         throw();
00199 
00214     _DWFTK_API
00215     DWFCustomSection( const DWFString& zType,
00216                       const DWFString& zTitle,
00217                       const DWFString& zObjectID,
00218                       double           nVersion,
00219                       double           nPlotOrder,
00220                       const DWFSource& rSource )
00221         throw();
00222 
00229     _DWFTK_API
00230     DWFCustomSection( const DWFCustomSection& rSection )
00231         throw();
00232 
00239     _DWFTK_API
00240     DWFCustomSection& operator=( const DWFCustomSection& rSection )
00241         throw();
00242 
00248     _DWFTK_API
00249     virtual ~DWFCustomSection()
00250         throw();
00251 
00258     _DWFTK_API
00259     DWFCustomSection::tBehavior behavior() const
00260         throw();
00261 
00268     _DWFTK_API
00269     void applyBehavior( const DWFCustomSection::tBehavior& rBehavior )
00270         throw();
00271 
00272 #ifndef DWFTK_READ_ONLY
00273 
00277     _DWFTK_API
00278     virtual void serializeXML( DWFXMLSerializer& rSerializer, unsigned int nFlags )
00279         throw( DWFException );
00280 
00281 #endif
00282 
00283 protected:
00284 
00288     tBehavior   _tBehavior;
00289 };
00290 
00291 }
00292 
00293 #endif

Generated on Tue May 17 12:38:50 2005 for Autodesk DWF Toolkit by  doxygen 1.4.1