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

Servers/Common/vtkPVProgressHandler.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   ParaView
00004   Module:    $RCSfile: vtkPVProgressHandler.h,v $
00005 
00006   Copyright (c) Kitware, Inc.
00007   All rights reserved.
00008   See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
00024 #ifndef __vtkPVProgressHandler_h
00025 #define __vtkPVProgressHandler_h
00026 
00027 
00028 #include "vtkObject.h"
00029 
00030 class vtkProcessModule;
00031 class vtkPVWindow;
00032 class vtkTimerLog;
00033 class vtkMPIController;
00034 class vtkSocketController;
00035 class vtkPVProgressHandlerInternal;
00036 
00037 class VTK_EXPORT vtkPVProgressHandler : public vtkObject
00038 {
00039 public:
00040   static vtkPVProgressHandler* New();
00041   vtkTypeRevisionMacro(vtkPVProgressHandler, vtkObject);
00042   void PrintSelf(ostream& os, vtkIndent indent);
00043 
00044 
00046 
00047   virtual void SetProcessModule(vtkProcessModule *pvApp)
00048     {
00049     this->ProcessModule = pvApp;
00050     }
00052 
00054 
00055   virtual void InvokeProgressEvent(
00056     vtkProcessModule* pvApp,
00057     vtkObject* object,
00058     int val,
00059     const char* str);
00061 
00063   virtual void Cleanup() {}
00064 
00065 
00068   virtual void PrepareProgress(vtkProcessModule* app);
00069 
00072   virtual void CleanupPendingProgress(vtkProcessModule* app);
00073 
00075   virtual void RegisterProgressEvent(vtkObject* po, int id);
00076 
00078   virtual void SetSocketController(vtkSocketController* soc);
00079 
00081 
00082   vtkSetMacro(ClientMode, int);
00083   vtkSetMacro(ServerMode, int);
00085   
00086 protected:
00087   vtkPVProgressHandler();
00088   ~vtkPVProgressHandler();
00089 
00090   vtkProcessModule* ProcessModule;
00091 
00092   int ReceivingProgressReports;
00093 
00094   //BTX
00095   int ProgressPending;
00096   int Progress[4];
00097 
00099 
00100   enum {
00101     NotSet = 0,
00102     SingleProcess,
00103     SingleProcessMPI,
00104     SatelliteMPI,
00105     ClientServerClient,
00106     ClientServerServer,
00107     ClientServerServerMPI
00108   };
00109   //ETX
00111   
00112   void DetermineProgressType(vtkProcessModule* app);
00113   int ProgressType;
00114 
00115   int ClientMode;
00116   int ServerMode;
00117   int LocalProcessID;
00118   int NumberOfProcesses;
00119 
00120   void InvokeSatelliteProgressEvent(vtkProcessModule*, vtkObject*, int val);
00121   void InvokeRootNodeProgressEvent(vtkProcessModule*, vtkObject*, int val);
00122   void InvokeRootNodeServerProgressEvent(vtkProcessModule*, vtkObject*, int val);
00123   int ReceiveProgressFromSatellite(int* id, int* progress);
00124   void LocalDisplayProgress(vtkProcessModule* app, const char* filter, int progress);
00125   void HandleProgress(int processid, int filterid, int progress);
00126 
00127   double MinimumProgressInterval;
00128   vtkTimerLog* ProgressTimer;
00129 
00130   vtkMPIController* MPIController;
00131   vtkSocketController* SocketController;
00132   vtkPVProgressHandlerInternal* Internals;
00133 
00134   vtkPVProgressHandler(const vtkPVProgressHandler&); // Not implemented
00135   void operator=(const vtkPVProgressHandler&); // Not implemented
00136 };
00137 
00138 #endif
00139 

Generated on Tue May 30 12:31:45 2006 for ParaView by doxygen 1.3.5