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

PackageManifestReader.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_PACKAGE_MANIFEST_READER_H
00021 #define _DWFTK_PACKAGE_MANIFEST_READER_H
00022 
00027 
00028 #include "dwfcore/Core.h"
00029 using namespace DWFCore;
00030 
00031 #include "dwf/package/XML.h"
00032 #include "dwf/package/Section.h"
00033 #include "dwf/package/Property.h"
00034 #include "dwf/package/Interface.h"
00035 #include "dwf/package/Dependency.h"
00036 #include "dwf/package/reader/PackageReader.h"
00037 
00038 
00039 
00040 namespace DWFToolkit
00041 {
00042 
00071 class DWFManifestReader : public DWFXMLCallback
00072 {
00073 
00074 public:
00075 
00083     typedef enum
00084     {
00088         eProvideNone            =   0x00,
00089 
00093         eProvideVersion         =   0x01,
00097         eProvideObjectID        =   0x02,
00098 
00102         eProvideDependencies    =   0x04,
00106         eProvideInterfaces      =   0x08,
00110         eProvideProperties      =   0x10,
00114         eProvideSections        =   0x20,
00115 
00119         eProvideAttributes      =   0x03,
00123         eProvideElements        =   0x3C,
00124 
00128         eProvideAll             =   0xFF
00129 
00130     } teProviderType;
00131 
00132 public:
00133 
00141     _DWFTK_API
00142     DWFManifestReader( DWFPackageReader* pPackageReader = NULL,
00143                        unsigned char     nProviderFlags = eProvideAll )
00144         throw();
00145 
00151     _DWFTK_API
00152     virtual ~DWFManifestReader()
00153         throw();
00154 
00162     _DWFTK_API
00163     DWFManifestReader* filter() const
00164         throw();
00165 
00174     _DWFTK_API
00175     void setFilter( DWFManifestReader* pFilter )
00176         throw();
00177 
00185     _DWFTK_API
00186     virtual double provideVersion( double nVersion )
00187         throw();
00188 
00196     _DWFTK_API
00197     virtual const char* provideObjectID( const char* zObjectID )
00198         throw();
00199 
00208     _DWFTK_API
00209     virtual DWFDependency* provideDependency( DWFDependency* pDependency )
00210         throw();
00211 
00220     _DWFTK_API
00221     virtual DWFInterface* provideInterface( DWFInterface* pInterface )
00222         throw();
00223 
00232     _DWFTK_API
00233     virtual DWFProperty* provideProperty( DWFProperty* pProperty )
00234         throw();
00235 
00244     _DWFTK_API
00245     virtual DWFSection* provideSection( DWFSection* pSection )
00246         throw();
00247 
00251     _DWFTK_API
00252     void notifyStartElement( const char*   zName,
00253                              const char**  ppAttributeList )
00254         throw();
00255 
00259     _DWFTK_API
00260     void notifyEndElement( const char*     zName )
00261         throw();
00262 
00266     _DWFTK_API
00267     void notifyStartNamespace( const char* zPrefix,
00268                                const char* zURI )
00269         throw();
00270 
00274     _DWFTK_API
00275     void notifyEndNamespace( const char*   zPrefix )
00276         throw();
00277 
00281     _DWFTK_API
00282     void notifyCharacterData( const char* zCData, 
00283                               int         nLength ) 
00284         throw();
00285 
00286 protected:
00287 
00291     DWFPackageReader* _pPackageReader;
00292 
00297     DWFXMLElementBuilder        _oDefaultElementBuilder;
00298 
00304     DWFXMLElementBuilder*       _pElementBuilder;
00305 
00306 private:
00307 
00308     void _provideVersion( double nVersion )
00309         throw();
00310 
00311     void _provideObjectID( const char* zObjectID )
00312         throw();
00313 
00314     void _provideDependency( DWFDependency* pDependency )
00315         throw();
00316 
00317     void _provideInterface( DWFInterface* pInterface )
00318         throw();
00319 
00320     void _provideProperty( DWFProperty* pProperty )
00321         throw();
00322 
00323     void _provideSection( DWFSection* pSection )
00324         throw();
00325 
00326 private:
00327 
00328     unsigned char _nProviderFlags;
00329     unsigned char _nCurrentCollectionProvider;
00330 
00331     DWFXMLBuildable*    _pCurrentElement;
00332     DWFManifestReader*  _pFilter;
00333 
00334 private:
00335 
00336     //
00337     // Not implemented
00338     //
00339 
00340     DWFManifestReader( const DWFManifestReader& );
00341     DWFManifestReader& operator=( const DWFManifestReader& );
00342 };
00343 
00344 }
00345 
00346 #endif

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