Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkOldStyleCallbackCommand.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkOldStyleCallbackCommand.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00045 #ifndef __vtkOldStyleCallbackCommand_h
00046 #define __vtkOldStyleCallbackCommand_h
00047 
00048 #include "vtkCommand.h"
00049 
00050 // the old style void fund(void *) callbacks
00051 class VTK_COMMON_EXPORT vtkOldStyleCallbackCommand : public vtkCommand
00052 {
00053 public:
00054   static vtkOldStyleCallbackCommand *New() 
00055     {return new vtkOldStyleCallbackCommand;};
00056 
00058   void Execute(vtkObject *invoker, unsigned long eid, void *calldata);
00059 
00061 
00062   void SetClientData(void *cd) 
00063     {this->ClientData = cd;};
00064   void SetCallback(void (*f)(void *clientdata)) 
00065     {this->Callback = f;};
00066   void SetClientDataDeleteCallback(void (*f)(void *))
00067     {this->ClientDataDeleteCallback = f;};
00069   
00070   void *ClientData;
00071   void (*Callback)(void *);
00072   void (*ClientDataDeleteCallback)(void *);
00073 
00074 protected:
00075   vtkOldStyleCallbackCommand();
00076   ~vtkOldStyleCallbackCommand();
00077 };
00078 
00079 
00080 #endif /* __vtkOldStyleCallbackCommand_h */
00081