DWFDocumentSequenceReader.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 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/dwfx/reader/DWFDocumentSequenceReader.h#2 $
00019 //  $DateTime: 2008/06/18 18:08:14 $
00020 //  $Author: gaoje $
00021 //  $Change: 101166 $
00022 //  $Revision: #2 $
00023 //
00024 //
00025 
00026 #ifndef _DWFTK_DWFXDWFDocumentSequenceReader_H
00027 #define _DWFTK_DWFXDWFDocumentSequenceReader_H
00028 
00033 
00034 #include "dwfcore/XML.h"
00035 using namespace DWFCore;
00036 
00037 #include "dwf/opc/reader/XMLElementBuilder.h"
00038 
00039 namespace DWFToolkit
00040 {
00041 
00042 //
00043 // fwd decl
00044 //
00045 class OPCRelationship;
00046 
00047 
00059 class DWFXDWFDocumentSequenceReader : public DWFCore::DWFXMLCallback
00060                                       _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00061 {
00062 
00063 public:
00064 
00071     typedef enum teProviderType
00072     {
00076         eProvideNone                =   0x00,
00077 
00081         eProvideDocuments           =   0x01,
00082 
00086         eProvideElements            =   0xF0,
00087 
00091         eProvideAll                 =   0xFF
00092 
00093     } teProviderType;
00094 
00095 public:
00096 
00103     _DWFTK_API
00104     DWFXDWFDocumentSequenceReader( unsigned int nProviderFlags = eProvideAll )
00105         throw();
00106 
00112     _DWFTK_API
00113     virtual ~DWFXDWFDocumentSequenceReader()
00114         throw();
00115 
00116 
00124     _DWFTK_API
00125     DWFXDWFDocumentSequenceReader* filter() const
00126         throw();
00127 
00136     _DWFTK_API
00137     void setFilter( DWFXDWFDocumentSequenceReader* pFilter )
00138         throw();
00139 
00140 
00148     _DWFTK_API
00149     virtual DWFString provideDocumentURI( const DWFString& zDocumentURI )
00150         throw();
00151 
00155     _DWFTK_API
00156     void notifyStartElement( const char*   zName,
00157                              const char**  ppAttributeList )
00158         throw();
00159 
00163     _DWFTK_API
00164     void notifyEndElement( const char*     zName )
00165         throw();
00166 
00170     _DWFTK_API
00171     void notifyStartNamespace( const char* zPrefix,
00172                                const char* zURI )
00173         throw();
00174 
00178     _DWFTK_API
00179     void notifyEndNamespace( const char*   zPrefix )
00180         throw();
00181 
00185     _DWFTK_API
00186     void notifyCharacterData( const char* zCData, 
00187                               int         nLength ) 
00188         throw();
00189 
00190 protected:
00191 
00196     OPCXMLElementBuilder    _oDefaultElementBuilder;
00197 
00203     OPCXMLElementBuilder*   _pElementBuilder;
00204 
00205 private:
00206 
00207     unsigned int                    _nProviderFlags;
00208     DWFXDWFDocumentSequenceReader*  _pFilter;
00209     DWFString                       _zCurrentURI;
00210 
00211 private:
00212 
00213     //
00214     //
00215     //
00216     void _provideDocumentURI( const DWFString& zDocumentURI )
00217         throw();
00218 
00219 private:
00220 
00221     //
00222     // Not implemented
00223     //
00224     DWFXDWFDocumentSequenceReader( const DWFXDWFDocumentSequenceReader& );
00225     DWFXDWFDocumentSequenceReader& operator=( const DWFXDWFDocumentSequenceReader& );
00226 
00227 };
00228 
00229 }
00230 
00231 #endif

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