Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

Callback.h

Go to the documentation of this file.
00001 
00003 //
00004 //  Copyright (c) 2002, John K. Grant and Perry L. Miller IV.
00005 //  All rights reserved.
00006 //  BSD License: http://www.opensource.org/licenses/bsd-license.html
00007 //
00009 
00011 //
00012 //  Base callbacks class.
00013 //
00015 
00016 #ifndef _VRJGA_CALLBACK_H_
00017 #define _VRJGA_CALLBACK_H_
00018 
00019 #include "vrjGA/Referenced.h"
00020 #include "vrjGA/Messages.h"
00021 
00022 
00023 namespace vrjGA {
00024 
00025 
00026 class VRJ_GA_EXPORT Callback : public Referenced
00027 {
00028 public:
00029 
00030   // Typedefs and smart-pointers.
00031   typedef Referenced BaseClass;
00032   VRJGA_DECLARE_POINTER ( Callback );
00033 
00034   // Execute the callback functionality.
00035   virtual void operator () ( Message m, Referenced *caller ) = 0;
00036 
00037 protected:
00038 
00039   // Construction.
00040   Callback();
00041   Callback ( const Callback & );
00042   Callback& operator = ( const Callback & );
00043 
00044   // Use reference counting.
00045   virtual ~Callback();
00046 };
00047 
00048 
00049 }; // namespace vrjGA
00050 
00051 
00052 #endif // _VRJGA_CALLBACK_H_

Generated on Thu Aug 12 16:42:14 2004 for vrjGA by doxygen 1.3.5