DataSectionDescriptorReader.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/DataSectionDescriptorReader.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_DATA_SECTION_DESCRIPTOR_READER_H
00028 #define _DWFTK_DATA_SECTION_DESCRIPTOR_READER_H
00029 
00034 
00035 
00036 #include "dwfcore/Core.h"
00037 using namespace DWFCore;
00038 
00039 #include "dwf/package/Units.h"
00040 #include "dwf/package/Property.h"
00041 #include "dwf/package/FontResource.h"
00042 #include "dwf/package/GraphicResource.h"
00043 #include "dwf/presentation/ContentPresentationResource.h"
00044 #include "dwf/package/reader/SectionDescriptorReader.h"
00045 
00046 
00047 namespace DWFToolkit
00048 {
00049 
00079 class DWFDataSectionDescriptorReader : public DWFSectionDescriptorReader
00080                                        _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00081 {
00082 
00083 public:
00084 
00092     typedef enum
00093     {
00097         eProvideNone                        =   0x000,
00098 
00102         eProvideName                        =   0x001,
00106         eProvideVersion                     =   0x002,
00110         eProvidePlotOrder                   =   0x004,
00114         eProvideObjectID                    =   0x008,
00115 
00119         eProvideProperties                  =   0x010,
00123         eProvideResources                   =   0x020,
00124 
00128         eProvideUntypedResource             =   0x040,
00132         eProvideFontResource                =   0x080,
00136         eProvideImageResource               =   0x100,
00140         eProvideContentPresentationResource =   0x200,
00141 
00145         eProvideAttributes                  =   0x00F,
00146         
00150         eProvideElements                    =   0xFF0,
00151 
00155         eProvideAll                         =   0xFFF
00156 
00157     } teProviderType;
00158 
00159 public:
00160 
00168     _DWFTK_API
00169     DWFDataSectionDescriptorReader( DWFPackageReader*  pPackageReader = NULL,
00170                                     unsigned int       nProviderFlags = eProvideAll )
00171         throw();
00172 
00178     _DWFTK_API
00179     virtual ~DWFDataSectionDescriptorReader()
00180         throw();
00181 
00185     _DWFTK_API
00186     DWFDataSectionDescriptorReader* filter() const
00187         throw();
00188 
00192     _DWFTK_API
00193     void setFilter( DWFDataSectionDescriptorReader* pFilter )
00194         throw();
00195 
00203     _DWFTK_API
00204     virtual const char* provideName( const char* zName )
00205         throw();
00206 
00214     _DWFTK_API
00215     virtual const char* provideObjectID( const char* zObjectID )
00216         throw();
00217 
00225     _DWFTK_API
00226     virtual double provideVersion( double nVersion )
00227         throw();
00228 
00236     _DWFTK_API
00237     virtual double providePlotOrder( double nPlotOrder )
00238         throw();
00239 
00248     _DWFTK_API
00249     virtual DWFProperty* provideProperty( DWFProperty* pProperty )
00250         throw();
00251 
00260     _DWFTK_API
00261     virtual DWFResource* provideResource( DWFResource* pResource )
00262         throw();
00263 
00272     _DWFTK_API
00273     virtual DWFFontResource* provideFontResource( DWFFontResource* pResource )
00274         throw();
00275 
00284     _DWFTK_API
00285     virtual DWFImageResource* provideImageResource( DWFImageResource* pResource )
00286         throw();
00287 
00296     _DWFTK_API
00297     virtual DWFContentPresentationResource* provideContentPresentationResource( DWFContentPresentationResource* pResource )
00298         throw();    
00299 
00303     _DWFTK_API
00304     void notifyStartElement( const char*   zName,
00305                              const char**  ppAttributeList )
00306         throw();
00307 
00311     _DWFTK_API
00312     void notifyEndElement( const char*     zName )
00313         throw();
00314 
00318     _DWFTK_API
00319     void notifyStartNamespace( const char* zPrefix,
00320                                const char* zURI )
00321         throw();
00322 
00326     _DWFTK_API
00327     void notifyEndNamespace( const char*   zPrefix )
00328         throw();
00329 
00330 protected:
00331 
00335     void _provideAttributes( const char**   ppAttributeList )
00336         throw();
00337 
00338 private:
00339 
00340     void _provideName( const char* zName )
00341         throw();
00342 
00343     void _provideObjectID( const char* zObjectID )
00344         throw();
00345 
00346     void _provideVersion( double nVersion )
00347         throw();
00348 
00349     void _providePlotOrder( double nPlotOrder )
00350         throw();
00351 
00352     void _provideProperty( DWFProperty* pProperty )
00353         throw();
00354 
00355     void _provideResource( DWFResource* pResource )
00356         throw();
00357 
00358     void _provideFontResource( DWFFontResource* pResource )
00359         throw();
00360 
00361     void _provideImageResource( DWFImageResource* pResource )
00362         throw();
00363 
00364     void _provideContentPresentationResource( DWFContentPresentationResource* pResource )
00365         throw();
00366 
00367 private:
00368 
00369     unsigned int                    _nProviderFlags;
00370     unsigned int                    _nCurrentCollectionProvider;
00371 
00372     DWFResource*                    _pCurrentResource;
00373     DWFDataSectionDescriptorReader* _pFilter;
00374 
00375 private:
00376 
00377     //
00378     // Not implemented
00379     //
00380 
00381     DWFDataSectionDescriptorReader( const DWFDataSectionDescriptorReader& );
00382     DWFDataSectionDescriptorReader& operator=( const DWFDataSectionDescriptorReader& );
00383 };
00384 
00385 }
00386 
00387 #endif

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