SectionDescriptorReader.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 
00019 
00020 #ifndef _DWFTK_SECTION_DESCRIPTOR_READER_H
00021 #define _DWFTK_SECTION_DESCRIPTOR_READER_H
00022 
00027 
00028 #include "dwfcore/Core.h"
00029 #include "dwfcore/XML.h"
00030 using namespace DWFCore;
00031 
00032 
00033 #include "dwf/package/XML.h"
00034 #include "dwf/package/reader/PackageReader.h"
00035 
00036 
00037 
00038 namespace DWFToolkit
00039 {
00040 
00070 class DWFSectionDescriptorReader : public DWFCore::DWFXMLCallback
00071 
00072                                     _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00073 {
00074 
00075 public:
00076 
00084     typedef enum
00085     {
00089         eProvideNone            =   0x00,
00090 
00094         eProvideAttributes      =   0x01,
00098        eProvideType            =   0x02,
00099 
00103         eProvideAll             =   0xFF
00104 
00105     } teProviderType;
00106 
00107 public:
00108 
00116     _DWFTK_API
00117     DWFSectionDescriptorReader( DWFPackageReader*   pPackageReader = NULL,
00118                                 unsigned char       nProviderFlags = eProvideAll )
00119         throw();
00120 
00126     _DWFTK_API
00127     virtual ~DWFSectionDescriptorReader()
00128         throw();
00129 
00137     _DWFTK_API
00138     DWFSectionDescriptorReader* filter() const
00139         throw();
00140 
00149     _DWFTK_API
00150     void setFilter( DWFSectionDescriptorReader* pFilter )
00151         throw();
00152 
00160     _DWFTK_API
00161     virtual bool provideType( const char*   zType )
00162         throw();
00163 
00167     _DWFTK_API
00168     virtual void notifyStartElement( const char*    zName,
00169                                      const char**   ppAttributeList )
00170         throw();
00171 
00175     _DWFTK_API
00176     virtual void notifyEndElement( const char*      zName )
00177         throw();
00178 
00182     _DWFTK_API
00183     virtual void notifyStartNamespace( const char*  zPrefix,
00184                                        const char*  zURI )
00185         throw();
00186 
00190     _DWFTK_API
00191     virtual void notifyEndNamespace( const char*    zPrefix )
00192         throw();
00193 
00197     _DWFTK_API
00198     virtual void notifyCharacterData( const char* zCData, 
00199                                       int         nLength ) 
00200         throw();
00201 
00202     //
00203     //
00204     //
00205     _DWFTK_API
00206     virtual void _provideAttributes( const char**   ppAttributeList )
00207         throw();
00208 
00209 protected:
00210 
00211     _DWFTK_API
00212     DWFString _findAttributeValue( const char*  zAttributeName,
00213                                    const char** ppAttributeList );
00214 
00215 private:
00216 
00217     void _provideType( const char* zType )
00218         throw();
00219 
00220 protected:
00221 
00226     DWFXMLElementBuilder        _oDefaultElementBuilder;
00227 
00233     DWFXMLElementBuilder*       _pElementBuilder;
00234 
00238     DWFPackageReader*           _pPackageReader;
00239 
00240 private:
00241 
00242     unsigned char               _nProviderFlags;
00243     DWFSectionDescriptorReader* _pFilter;
00244 
00245 private:
00246 
00247     //
00248     // Not implemented
00249     //
00250 
00251     DWFSectionDescriptorReader( const DWFSectionDescriptorReader& );
00252     DWFSectionDescriptorReader& operator=( const DWFSectionDescriptorReader& );
00253 };
00254 
00255 
00256 
00257 }
00258 
00259 #endif

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