PropertyVisitor.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_PROPERTYVISITOR_H
00020 #define _DWFTK_PROPERTYVISITOR_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/Property.h"
00039 #include "dwf/package/utility/PropertyContainer.h"
00040 
00041 
00042 
00043 namespace DWFToolkit
00044 {
00045 
00046 
00047 
00056 class DWFPropertyVisitor
00057     // _DWFTK_EXPORT_API_MEMORY_CONTROL_BASE - intentionally omitted, as this is just an interface
00058 {
00059 
00060 public:
00061 
00067     _DWFTK_API
00068     virtual ~DWFPropertyVisitor()
00069         throw()
00070     {;}
00071 
00079     _DWFTK_API
00080     virtual void visitProperty( DWFProperty& rProperty )
00081         throw( DWFException )
00082     {
00083         if (_pComposite)
00084         {
00085             _pComposite->visitProperty( rProperty );
00086         }
00087     }
00088 
00096     _DWFTK_API
00097     virtual void visitPropertyContainer( DWFPropertyContainer& rPropertyContainer )
00098         throw( DWFException )
00099     {
00100         if (_pComposite)
00101         {
00102             _pComposite->visitPropertyContainer( rPropertyContainer );
00103         }
00104     }
00105 
00106 protected:
00107 
00115     _DWFTK_API
00116     DWFPropertyVisitor( DWFPropertyVisitor* pComposite = NULL )
00117         throw()
00118         : _pComposite( pComposite )
00119     {;}
00120 
00121 private:
00122 
00123     DWFPropertyVisitor( const DWFPropertyVisitor& );
00124     DWFPropertyVisitor& operator=( const DWFPropertyVisitor& );
00125 
00126 private:
00127 
00128     DWFPropertyVisitor* _pComposite;
00129 };
00130 
00131 }
00132 
00133 #endif  
00134 
00135 #endif
00136 

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