GlobalSectionDescriptorReader.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 1996-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/package/reader/GlobalSectionDescriptorReader.h#2 $
00019 //  $DateTime: 2008/06/18 18:08:14 $
00020 //  $Author: gaoje $
00021 //  $Change: 101166 $
00022 //  $Revision: #2 $
00023 //
00024 
00025 
00026 
00027 #ifndef _DWFTK_GLOBAL_SECTION_DESCRIPTOR_READER_H
00028 #define _DWFTK_GLOBAL_SECTION_DESCRIPTOR_READER_H
00029 
00030 
00035 
00036 
00037 
00038 #include "dwfcore/Core.h"
00039 #include "dwfcore/STL.h"
00040 using namespace DWFCore;
00041 
00042 #include "dwf/package/Property.h"
00043 #include "dwf/package/Bookmark.h"
00044 #include "dwf/package/FontResource.h"
00045 #include "dwf/package/GraphicResource.h"
00046 #include "dwf/package/reader/SectionDescriptorReader.h"
00047 
00048 
00049 namespace DWFToolkit
00050 {
00051 
00080 class DWFGlobalSectionDescriptorReader : public DWFSectionDescriptorReader
00081                                          _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00082 {
00083 
00084 public:
00085 
00093     typedef enum
00094     {
00098         eProvideNone            =   0x000,
00099 
00103         eProvideName            =   0x001,
00107         eProvideVersion         =   0x002,
00111         eProvidePlotOrder       =   0x004,
00112 
00116         eProvideProperties      =   0x010,
00120         eProvideResources       =   0x020,
00124         eProvideBookmarks       =   0x040,
00125 
00129         eProvideUntypedResource =   0x080,
00133         eProvideFontResource    =   0x100,
00137         eProvideGraphicResource =   0x200,
00141         eProvideImageResource   =   0x400,
00142 
00146         eProvideAttributes      =   0x00F,
00150         eProvideElements        =   0x7F0,
00151 
00155         eProvideAll             =   0xFFF
00156 
00157     } teProviderType;
00158 
00159 public:
00160 
00168     _DWFTK_API
00169     DWFGlobalSectionDescriptorReader( DWFPackageReader*  pPackageReader = NULL,
00170                                       unsigned int       nProviderFlags = eProvideAll )
00171         throw();
00172 
00178     _DWFTK_API
00179     virtual ~DWFGlobalSectionDescriptorReader()
00180         throw();
00181 
00185     _DWFTK_API
00186     DWFGlobalSectionDescriptorReader* filter() const
00187         throw();
00188 
00192     _DWFTK_API
00193     void setFilter( DWFGlobalSectionDescriptorReader* pFilter )
00194         throw();
00195 
00203     _DWFTK_API
00204     virtual const char* provideName( const char* zName )
00205         throw();
00206 
00214     _DWFTK_API
00215     virtual double provideVersion( double nVersion )
00216         throw();
00217 
00226     _DWFTK_API
00227     virtual DWFProperty* provideProperty( DWFProperty* pProperty )
00228         throw();
00229 
00238     _DWFTK_API
00239     virtual DWFResource* provideResource( DWFResource* pResource )
00240         throw();
00241 
00250     _DWFTK_API
00251     virtual DWFFontResource* provideFontResource( DWFFontResource* pResource )
00252         throw();
00253 
00262     _DWFTK_API
00263     virtual DWFGraphicResource* provideGraphicResource( DWFGraphicResource* pResource )
00264         throw();
00265 
00274     _DWFTK_API
00275     virtual DWFImageResource* provideImageResource( DWFImageResource* pResource )
00276         throw();
00277 
00286     _DWFTK_API
00287     virtual DWFBookmark* provideBookmark( DWFBookmark* pBookmark )
00288         throw();
00289 
00293     _DWFTK_API
00294     void notifyStartElement( const char*   zName,
00295                              const char**  ppAttributeList )
00296         throw();
00297 
00301     _DWFTK_API
00302     void notifyEndElement( const char*     zName )
00303         throw();
00304 
00308     _DWFTK_API
00309     void notifyStartNamespace( const char* zPrefix,
00310                                const char* zURI )
00311         throw();
00312 
00316     _DWFTK_API
00317     void notifyEndNamespace( const char*   zPrefix )
00318         throw();
00319 
00320 
00321 
00325     void _provideAttributes( const char**   ppAttributeList )
00326         throw();
00327 
00328 private:
00329 
00330     void _provideName( const char* zName )
00331         throw();
00332 
00333     void _provideVersion( double nVersion )
00334         throw();
00335 
00336     void _provideProperty( DWFProperty* pProperty )
00337         throw();
00338 
00339     void _provideResource( DWFResource* pResource )
00340         throw();
00341 
00342     void _provideFontResource( DWFFontResource* pResource )
00343         throw();
00344 
00345     void _provideGraphicResource( DWFGraphicResource* pResource )
00346         throw();
00347 
00348     void _provideImageResource( DWFImageResource* pResource )
00349         throw();
00350 
00351     void _provideBookmark( DWFBookmark* pBookmark )
00352         throw();
00353 
00354 protected:
00355 
00356     unsigned int _nProviderFlags;
00357 
00358 private:
00359 
00360     unsigned int                        _nCurrentCollectionProvider;
00361     DWFResource*                        _pCurrentResource;
00362     DWFGlobalSectionDescriptorReader*   _pFilter;
00363 
00364     DWFBookmark::tList          _oBookmarks;
00365 
00366 private:
00367 
00368     //
00369     // Not implemented
00370     //
00371 
00372     DWFGlobalSectionDescriptorReader( const DWFGlobalSectionDescriptorReader& );
00373     DWFGlobalSectionDescriptorReader& operator=( const DWFGlobalSectionDescriptorReader& );
00374 };
00375 
00376 }
00377 
00378 #endif

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