DWFResourceVisitor.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 #ifndef _DWFTK_DWFRESOURCEVISITOR_H
00020 #define _DWFTK_DWFRESOURCEVISITOR_H
00021 
00022 
00027 
00028 #ifndef DWFTK_READ_ONLY
00029 
00030 
00031 
00032 #include "dwfcore/STL.h"
00033 #include "dwfcore/Iterator.h"
00034 #include "dwfcore/Exception.h"
00035 using namespace DWFCore;
00036 
00037 #include "dwf/Toolkit.h"
00038 #include "dwf/package/Resource.h"
00039 
00040 namespace DWFToolkit
00041 {
00042 
00043 
00052 class DWFResourceVisitor
00053     // _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE - intentionally omitted, as this is just an interface
00054 {
00055 
00056 public:
00057 
00063     _DWFTK_API
00064     virtual ~DWFResourceVisitor()
00065         throw()
00066     {;}
00067 
00076     _DWFTK_API
00077     virtual DWFResource* visitResource( DWFSection& rSection, DWFResource* pResource )
00078         throw( DWFException )
00079     {
00080         if (_pComposite)
00081         {
00082             return _pComposite->visitResource( rSection, pResource );
00083         }
00084 
00085         return NULL;
00086     }
00087 
00088 protected:
00089 
00097     _DWFTK_API
00098     DWFResourceVisitor( DWFResourceVisitor* pComposite = NULL )
00099         throw()
00100         : _pComposite( pComposite )
00101     {;}
00102 
00103 private:
00104 
00105     DWFResourceVisitor( const DWFResourceVisitor& );
00106     DWFResourceVisitor& operator=( const DWFResourceVisitor& );
00107 
00108 private:
00109 
00110     DWFResourceVisitor* _pComposite;
00111 };
00112 
00113 }
00114 
00115 #endif  
00116 
00117 #endif
00118 

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