vtkObservation.h

Go to the documentation of this file.
00001 /*=auto=========================================================================
00002 
00003   Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
00004 
00005   See Doc/copyright/copyright.txt
00006   or http://www.slicer.org/copyright/copyright.txt for details.
00007 
00008   Program:   3D Slicer
00009   Module:    $RCSfile: vtkObservation.h,v $
00010   Date:      $Date: 2006/01/08 04:48:05 $
00011   Version:   $Revision: 1.45 $
00012 
00013 =========================================================================auto=*/
00026 //
00030 
00031 #ifndef __vtkObservation_h
00032 #define __vtkObservation_h
00033 
00034 #include "vtkObject.h"
00035 #include "vtkObjectFactory.h"
00036 #include "vtkCallbackCommand.h"
00037 
00038 #include "vtkEventBroker.h"
00039 
00040 class VTK_MRML_EXPORT vtkObservation : public vtkObject 
00041 {
00042   public:
00043   
00045   static vtkObservation *New();
00046   vtkTypeRevisionMacro(vtkObservation,vtkObject);
00047   void PrintSelf(ostream& os, vtkIndent indent);
00048 
00055   vtkSetObjectMacro (EventBroker, vtkEventBroker);
00056   vtkGetObjectMacro (EventBroker, vtkEventBroker);
00057   vtkGetMacro (InEventQueue, int);
00058   vtkSetMacro (InEventQueue, int);
00059   vtkGetObjectMacro (ObservationCallbackCommand, vtkCallbackCommand);
00060   vtkGetObjectMacro (Subject, vtkObject);
00061   void AssignSubject(vtkObject* subject) {this->Subject = subject;};
00062   vtkGetMacro (Event, unsigned long);
00063   vtkSetMacro (Event, unsigned long);
00064   vtkSetObjectMacro (CallbackCommand, vtkCallbackCommand);
00065   vtkGetObjectMacro (CallbackCommand, vtkCallbackCommand);
00066   vtkSetStringMacro (Script);
00067   vtkGetStringMacro (Script);
00068   vtkGetObjectMacro (Observer, vtkObject);
00069   void AssignObserver(vtkObject* observer) {this->Observer = observer;};
00070   vtkSetStringMacro (Comment);
00071   vtkGetStringMacro (Comment);
00072 
00073   vtkGetMacro (EventTag, unsigned long);
00074   vtkSetMacro (EventTag, unsigned long);
00075   vtkGetMacro (SubjectDeleteEventTag, unsigned long);
00076   vtkSetMacro (SubjectDeleteEventTag, unsigned long);
00077   vtkGetMacro (ObserverDeleteEventTag, unsigned long);
00078   vtkSetMacro (ObserverDeleteEventTag, unsigned long);
00079 
00083   vtkGetMacro (LastElapsedTime, double);
00084   vtkSetMacro (LastElapsedTime, double);
00085   vtkGetMacro (TotalElapsedTime, double);
00086   vtkSetMacro (TotalElapsedTime, double);
00087 
00088   //BTX
00089   std::deque<void *> *GetCallDataList() {return &(this->CallDataList);};
00090   //ETX
00091 
00092 protected:
00093   vtkObservation();
00094   virtual ~vtkObservation();
00095   vtkObservation(const vtkObservation&);
00096   void operator=(const vtkObservation&);
00097 
00100   vtkEventBroker *EventBroker;
00101 
00105   vtkCallbackCommand *ObservationCallbackCommand;
00106 
00111   int InEventQueue;
00112 
00115   vtkObject *Subject;
00116 
00119   unsigned long Event;
00120 
00123   vtkObject *Observer;
00124 
00127   vtkCallbackCommand *CallbackCommand;
00128 
00131   //BTX
00132   std::deque<void *> CallDataList;
00133   //ETX
00134 
00137   char *Script;
00138 
00141   char *Comment;
00142 
00146   unsigned long EventTag;
00147   unsigned long SubjectDeleteEventTag;
00148   unsigned long ObserverDeleteEventTag;
00149 
00150   double LastElapsedTime;
00151   double TotalElapsedTime;
00152 
00153 };
00154 
00155 #endif
00156 

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1