RelationshipContainerReader.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/opc/reader/RelationshipContainerReader.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_OPCRELATIONSHIPCONTAINERREADER_H
00027 #define _DWFTK_OPCRELATIONSHIPCONTAINERREADER_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 
00060 class OPCRelationshipContainerReader : public DWFCore::DWFXMLCallback
00061                                       _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE_MEMBER
00062 {
00063 
00064 public:
00065 
00072     typedef enum teProviderType
00073     {
00077         eProvideNone                =   0x00,
00078 
00082         eProvideRelationships       =   0x01,
00083 
00087         eProvideElements            =   0xF0,
00088 
00092         eProvideAll                 =   0xFF
00093 
00094     } teProviderType;
00095 
00096 public:
00097 
00104     _DWFTK_API
00105     OPCRelationshipContainerReader( unsigned int nProviderFlags = eProvideAll )
00106         throw();
00107 
00113     _DWFTK_API
00114     virtual ~OPCRelationshipContainerReader()
00115         throw();
00116 
00117 
00125     _DWFTK_API
00126     OPCRelationshipContainerReader* filter() const
00127         throw();
00128 
00137     _DWFTK_API
00138     void setFilter( OPCRelationshipContainerReader* pFilter )
00139         throw();
00140 
00141 
00149     _DWFTK_API
00150     virtual OPCRelationship* provideRelationship( OPCRelationship* pRelationship )
00151         throw();
00152 
00156     _DWFTK_API
00157     void notifyStartElement( const char*   zName,
00158                              const char**  ppAttributeList )
00159         throw();
00160 
00164     _DWFTK_API
00165     void notifyEndElement( const char*     zName )
00166         throw();
00167 
00171     _DWFTK_API
00172     void notifyStartNamespace( const char* zPrefix,
00173                                const char* zURI )
00174         throw();
00175 
00179     _DWFTK_API
00180     void notifyEndNamespace( const char*   zPrefix )
00181         throw();
00182 
00186     _DWFTK_API
00187     void notifyCharacterData( const char* zCData, 
00188                               int         nLength ) 
00189         throw();
00190 
00191 protected:
00192 
00197     OPCXMLElementBuilder    _oDefaultElementBuilder;
00198 
00204     OPCXMLElementBuilder*   _pElementBuilder;
00205 
00206 private:
00207 
00208     unsigned int                    _nProviderFlags;
00209     OPCRelationshipContainerReader* _pFilter;
00210     OPCRelationship*                _pCurrentRelationship;
00211 
00212 private:
00213 
00214     //
00215     //
00216     //
00217     void _provideRelationship( OPCRelationship* pRelationship )
00218         throw();
00219 
00220 private:
00221 
00222     //
00223     // Not implemented
00224     //
00225 
00226     OPCRelationshipContainerReader( const OPCRelationshipContainerReader& );
00227     OPCRelationshipContainerReader& operator=( const OPCRelationshipContainerReader& );
00228 
00229 };
00230 
00231 }
00232 
00233 #endif

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