W3DOpcodeHandler.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,
00008 //  AS TO THE CORRECTNESS OF THIS CODE OR ANY DERIVATIVE
00009 //  WORKS WHICH INCORPORATE IT.
00010 //
00011 //  AUTODESK PROVIDES THE CODE ON AN "AS-IS" BASIS
00012 //  AND EXPLICITLY DISCLAIMS ANY LIABILITY, INCLUDING
00013 //  CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
00014 //  OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
00015 //
00016 //  Use, duplication, or disclosure by the U.S. Government is subject to
00017 //  restrictions set forth in FAR 52.227-19 (Commercial Computer Software
00018 //  Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
00019 //  Data and Computer Software), as applicable.
00020 //
00021 
00022 #ifndef _DWFW3DTK_OPCODE_HANDLER_H
00023 #define _DWFW3DTK_OPCODE_HANDLER_H
00024 
00029 
00030 #include "dwfcore/Exception.h"
00031 using namespace DWFCore;
00032 
00033 
00034 #include "dwf/Toolkit.h"
00035 
00036 
00037 #ifndef _W3DTK_REQUIRE_VERSION
00038 #define _W3DTK_REQUIRE_VERSION( v )     { if (_nRequiredVersion < v) _nRequiredVersion = v; }
00039 #endif
00040 
00041 
00042 
00043 //
00044 // fwd decl
00045 //
00046 class BBaseOpcodeHandler;
00047 
00054 class BBINFILETK_API BaseOpcodeHandlerObserver
00055 {
00056 
00057 public:
00058 
00062     virtual ~BaseOpcodeHandlerObserver()
00063         throw()
00064     {;}
00065 
00074     virtual void notify( BBaseOpcodeHandler* pHandler,
00075                          const void*         pTag = NULL )
00076         throw( DWFException ) = 0;
00077 
00078 protected:
00079 
00083     BaseOpcodeHandlerObserver()
00084         throw()
00085     {;}
00086 };
00087 
00088 
00094 class BBINFILETK_API W3DOpcodeHandler
00095 {
00096 
00097 public:
00098 
00102     virtual ~W3DOpcodeHandler()
00103     {;}
00104 
00110     void setObserver( BaseOpcodeHandlerObserver* pObserver )
00111         throw()
00112     {
00113         _pObserver = pObserver;
00114     }
00115 
00122     virtual void serialize( const void* pTag = NULL )
00123         throw( DWFException ) = 0;
00124 
00135     virtual unsigned int version()
00136         throw()
00137     {
00138         return _nRequiredVersion;
00139     }
00140 
00141 protected:
00142 
00148     W3DOpcodeHandler( BaseOpcodeHandlerObserver* pObserver = NULL )
00149         throw()
00150         : _nRequiredVersion( 0 )
00151         , _pObserver( pObserver )
00152     {;}
00153 
00154 protected:
00155 
00156     unsigned int                _nRequiredVersion;
00157     BaseOpcodeHandlerObserver*  _pObserver;
00158 
00159 private:
00160 
00161     //
00162     // Not Implemented
00163     //
00164 
00165     W3DOpcodeHandler( const W3DOpcodeHandler& rCamera );
00166     W3DOpcodeHandler& operator=( const W3DOpcodeHandler& rCamera );
00167 };
00168 
00169 
00170 
00171 #endif
00172 

Generated on Tue Jan 6 22:41:37 2009 for Autodesk DWF 3D Toolkit by  doxygen 1.4.5