EModelSectionDescriptorReader.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/EModelSectionDescriptorReader.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_EMODEL_SECTION_DESCRIPTOR_READER_H
00028 #define _DWFTK_EMODEL_SECTION_DESCRIPTOR_READER_H
00029 
00034 
00035 
00036 
00037 #include "dwfcore/Core.h"
00038 using namespace DWFCore;
00039 
00040 #include "dwf/package/Units.h"
00041 #include "dwf/package/Property.h"
00042 #include "dwf/package/FontResource.h"
00043 #include "dwf/package/GraphicResource.h"
00044 #include "dwf/presentation/ContentPresentationResource.h"
00045 #include "dwf/package/reader/SectionDescriptorReader.h"
00046 
00047 
00048 namespace DWFToolkit
00049 {
00050 
00080 class DWFEModelSectionDescriptorReader : public DWFSectionDescriptorReader
00081                                          _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00082 {
00083 
00084 public:
00085 
00093     typedef enum
00094     {
00098         eProvideNone                        =   0x0000,
00099 
00103         eProvideName                        =   0x0001,
00107         eProvideVersion                     =   0x0002,
00111         eProvidePlotOrder                   =   0x0004,
00112 
00116         eProvideProperties                  =   0x0010,
00120         eProvideResources                   =   0x0020,
00124         eProvideUnits                       =   0x0040,
00128         eProvideUntypedResource             =   0x0080,
00132         eProvideFontResource                =   0x0100,
00136         eProvideGraphicResource             =   0x0200,
00140         eProvideImageResource               =   0x0400,
00144         eProvideContentPresentationResource =   0x1000,
00145 
00149         eProvideAttributes                  =   0x000F,
00150 
00154         eProvideElements                    =   0xFFF0,
00155 
00159         eProvideAll                         =   0xFFFF
00160 
00161     } teProviderType;
00162 
00163 public:
00164 
00172     _DWFTK_API
00173     DWFEModelSectionDescriptorReader( DWFPackageReader*  pPackageReader = NULL,
00174                                       unsigned int       nProviderFlags = eProvideAll )
00175         throw();
00176 
00182     _DWFTK_API
00183     virtual ~DWFEModelSectionDescriptorReader()
00184         throw();
00185 
00189     _DWFTK_API
00190     DWFEModelSectionDescriptorReader* filter() const
00191         throw();
00192 
00196     _DWFTK_API
00197     void setFilter( DWFEModelSectionDescriptorReader* pFilter )
00198         throw();
00199 
00207     _DWFTK_API
00208     virtual const char* provideName( const char* zName )
00209         throw();
00210 
00218     _DWFTK_API
00219     virtual double provideVersion( double nVersion )
00220         throw();
00221 
00229     _DWFTK_API
00230     virtual double providePlotOrder( double nPlotOrder )
00231         throw();
00232 
00241     _DWFTK_API
00242     virtual DWFUnits* provideUnits( DWFUnits* pUnits )
00243         throw();
00244 
00253     _DWFTK_API
00254     virtual DWFProperty* provideProperty( DWFProperty* pProperty )
00255         throw();
00256 
00265     _DWFTK_API
00266     virtual DWFResource* provideResource( DWFResource* pResource )
00267         throw();
00268 
00277     _DWFTK_API
00278     virtual DWFFontResource* provideFontResource( DWFFontResource* pResource )
00279         throw();
00280 
00289     _DWFTK_API
00290     virtual DWFGraphicResource* provideGraphicResource( DWFGraphicResource* pResource )
00291         throw();
00292 
00301     _DWFTK_API
00302     virtual DWFImageResource* provideImageResource( DWFImageResource* pResource )
00303         throw();
00304 
00313     _DWFTK_API
00314     virtual DWFContentPresentationResource* provideContentPresentationResource( DWFContentPresentationResource* pResource )
00315         throw();    
00316 
00320     _DWFTK_API
00321     void notifyStartElement( const char*   zName,
00322                              const char**  ppAttributeList )
00323         throw();
00324 
00328     _DWFTK_API
00329     void notifyEndElement( const char*     zName )
00330         throw();
00331 
00335     _DWFTK_API
00336     void notifyStartNamespace( const char* zPrefix,
00337                                const char* zURI )
00338         throw();
00339 
00343     _DWFTK_API
00344     void notifyEndNamespace( const char*   zPrefix )
00345         throw();
00346 
00347 protected:
00348 
00352     void _provideAttributes( const char**   ppAttributeList )
00353         throw();
00354 
00355 private:
00356 
00357     void _provideName( const char* zName )
00358         throw();
00359 
00360     void _provideVersion( double nVersion )
00361         throw();
00362 
00363     void _providePlotOrder( double nPlotOrder )
00364         throw();
00365 
00366     void _provideUnits( DWFUnits* pPaper )
00367         throw();
00368 
00369     void _provideProperty( DWFProperty* pProperty )
00370         throw();
00371 
00372     void _provideResource( DWFResource* pResource )
00373         throw();
00374 
00375     void _provideFontResource( DWFFontResource* pResource )
00376         throw();
00377 
00378     void _provideGraphicResource( DWFGraphicResource* pResource )
00379         throw();
00380 
00381     void _provideImageResource( DWFImageResource* pResource )
00382         throw();
00383 
00384     void _provideContentPresentationResource( DWFContentPresentationResource* pResource )
00385         throw();
00386 
00387 private:
00388 
00389     unsigned int                        _nProviderFlags;
00390     unsigned int                        _nCurrentCollectionProvider;
00391 
00392     DWFResource*                        _pCurrentResource;
00393     DWFCoordinateSystem*                _pCoordinateSystem;
00394     DWFEModelSectionDescriptorReader*   _pFilter;
00395 
00396 private:
00397 
00398     //
00399     // Not implemented
00400     //
00401 
00402     DWFEModelSectionDescriptorReader( const DWFEModelSectionDescriptorReader& );
00403     DWFEModelSectionDescriptorReader& operator=( const DWFEModelSectionDescriptorReader& );
00404 };
00405 
00406 }
00407 
00408 #endif

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