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

GlobalSectionDescriptorReader.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_GLOBAL_SECTION_DESCRIPTOR_READER_H
00021 #define _DWFTK_GLOBAL_SECTION_DESCRIPTOR_READER_H
00022 
00023 
00028 
00029 
00030 
00031 #include "dwfcore/Core.h"
00032 #include "dwfcore/STL.h"
00033 using namespace DWFCore;
00034 
00035 #include "dwf/package/Property.h"
00036 #include "dwf/package/Bookmark.h"
00037 #include "dwf/package/FontResource.h"
00038 #include "dwf/package/GraphicResource.h"
00039 #include "dwf/package/reader/SectionDescriptorReader.h"
00040 
00041 
00042 namespace DWFToolkit
00043 {
00044 
00073 class DWFGlobalSectionDescriptorReader : public DWFSectionDescriptorReader
00074 {
00075 
00076 public:
00077 
00085     typedef enum
00086     {
00090         eProvideNone            =   0x000,
00091 
00095         eProvideName            =   0x001,
00099         eProvideVersion         =   0x002,
00103         eProvidePlotOrder       =   0x004,
00104 
00108         eProvideProperties      =   0x010,
00112         eProvideResources       =   0x020,
00116         eProvideBookmarks       =   0x040,
00117 
00121         eProvideUntypedResource =   0x080,
00125         eProvideFontResource    =   0x100,
00129         eProvideGraphicResource =   0x200,
00133         eProvideImageResource   =   0x400,
00134 
00138         eProvideAttributes      =   0x00F,
00142         eProvideElements        =   0x7F0,
00143 
00147         eProvideAll             =   0xFFF
00148 
00149     } teProviderType;
00150 
00151 public:
00152 
00160     _DWFTK_API
00161     DWFGlobalSectionDescriptorReader( DWFPackageReader*  pPackageReader = NULL,
00162                                       unsigned int       nProviderFlags = eProvideAll )
00163         throw();
00164 
00170     _DWFTK_API
00171     virtual ~DWFGlobalSectionDescriptorReader()
00172         throw();
00173 
00177     _DWFTK_API
00178     DWFGlobalSectionDescriptorReader* filter() const
00179         throw();
00180 
00184     _DWFTK_API
00185     void setFilter( DWFGlobalSectionDescriptorReader* pFilter )
00186         throw();
00187 
00195     _DWFTK_API
00196     virtual const char* provideName( const char* zName )
00197         throw();
00198 
00206     _DWFTK_API
00207     virtual double provideVersion( double nVersion )
00208         throw();
00209 
00218     _DWFTK_API
00219     virtual DWFProperty* provideProperty( DWFProperty* pProperty )
00220         throw();
00221 
00230     _DWFTK_API
00231     virtual DWFResource* provideResource( DWFResource* pResource )
00232         throw();
00233 
00242     _DWFTK_API
00243     virtual DWFFontResource* provideFontResource( DWFFontResource* pResource )
00244         throw();
00245 
00254     _DWFTK_API
00255     virtual DWFGraphicResource* provideGraphicResource( DWFGraphicResource* pResource )
00256         throw();
00257 
00266     _DWFTK_API
00267     virtual DWFImageResource* provideImageResource( DWFImageResource* pResource )
00268         throw();
00269 
00278     _DWFTK_API
00279     virtual DWFBookmark* provideBookmark( DWFBookmark* pBookmark )
00280         throw();
00281 
00285     _DWFTK_API
00286     void notifyStartElement( const char*   zName,
00287                              const char**  ppAttributeList )
00288         throw();
00289 
00293     _DWFTK_API
00294     void notifyEndElement( const char*     zName )
00295         throw();
00296 
00300     _DWFTK_API
00301     void notifyStartNamespace( const char* zPrefix,
00302                                const char* zURI )
00303         throw();
00304 
00308     _DWFTK_API
00309     void notifyEndNamespace( const char*   zPrefix )
00310         throw();
00311 
00312 protected:
00313 
00317     void _provideAttributes( const char**   ppAttributeList )
00318         throw();
00319 
00320 private:
00321 
00322     void _provideName( const char* zName )
00323         throw();
00324 
00325     void _provideVersion( double nVersion )
00326         throw();
00327 
00328     void _provideProperty( DWFProperty* pProperty )
00329         throw();
00330 
00331     void _provideResource( DWFResource* pResource )
00332         throw();
00333 
00334     void _provideFontResource( DWFFontResource* pResource )
00335         throw();
00336 
00337     void _provideGraphicResource( DWFGraphicResource* pResource )
00338         throw();
00339 
00340     void _provideImageResource( DWFImageResource* pResource )
00341         throw();
00342 
00343     void _provideBookmark( DWFBookmark* pBookmark )
00344         throw();
00345 
00346 protected:
00347 
00348     unsigned int _nProviderFlags;
00349 
00350 private:
00351 
00352     unsigned int                        _nCurrentCollectionProvider;
00353     DWFResource*                        _pCurrentResource;
00354     DWFGlobalSectionDescriptorReader*   _pFilter;
00355 
00356     vector<DWFBookmark*>                _oBookmarks;
00357 
00358 private:
00359 
00360     //
00361     // Not implemented
00362     //
00363 
00364     DWFGlobalSectionDescriptorReader( const DWFGlobalSectionDescriptorReader& );
00365     DWFGlobalSectionDescriptorReader& operator=( const DWFGlobalSectionDescriptorReader& );
00366 };
00367 
00368 }
00369 
00370 #endif

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