vtkMimxTestErrorCallback.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkMimxTestErrorCallback.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 =========================================================================*/
00015 // .NAME vtkMimxTestErrorCallback - To display error messages encountered during
00016 // program execution.
00017 // .SECTION Description
00018 // vtkMimxTestErrorCallback - to capture error during testing.
00019 // The error is VTK generated.
00020 
00021 #ifndef __vtkMimxTestErrorCallback_h
00022 #define __vtkMimxTestErrorCallback_h
00023 
00024 #include "vtkCommand.h"
00025 #include "vtkKWApplication.h"
00026 #include "vtkMimxCommonWin32Header.h"
00027 
00028 class VTK_MIMXCOMMON_EXPORT vtkMimxTestErrorCallback : public vtkCommand
00029 {
00030 public:
00031   static vtkMimxTestErrorCallback *New() 
00032     {return new vtkMimxTestErrorCallback;};
00033 
00034   // Description:
00035   // Satisfy the superclass API for callbacks.
00036   void Execute(vtkObject *invoker, unsigned long eid, void *calldata);
00037 
00038   // Description:
00039   // Methods to set and get client and callback information.
00040   void SetClientData(void *cd) 
00041     {this->ClientData = cd;};
00042   void SetCallback(void (*f)(void *clientdata)) 
00043     {this->Callback = f;};
00044   void SetClientDataDeleteCallback(void (*f)(void *))
00045     {this->ClientDataDeleteCallback = f;};
00046   
00047   void *ClientData;
00048   void (*Callback)(void *);
00049   void (*ClientDataDeleteCallback)(void *);
00050 
00051   vtkIdType GetState()
00052   {
00053     return this->State;
00054   }
00055 
00056   // Description:
00057   // Determines whether a vtk Error message has been invoked or not
00058   void SetState(vtkIdType currentState)
00059   {
00060     this->State = currentState;
00061   }
00062 
00063 protected:
00064   vtkMimxTestErrorCallback();
00065   ~vtkMimxTestErrorCallback();
00066   vtkIdType State;
00067 };
00068 
00069 
00070 #endif /* __vtkMimxTestErrorCallback_h */
00071  
00072 

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1