Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Common/vtkOldStyleCallbackCommand.h

Go to the documentation of this file.

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