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

Servers/Common/vtkPVProcessModule.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   ParaView
00004   Module:    $RCSfile: vtkPVProcessModule.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 =========================================================================*/
00022 #ifndef __vtkPVProcessModule_h
00023 #define __vtkPVProcessModule_h
00024 
00025 #include "vtkProcessModule.h"
00026 
00027 #include "vtkClientServerID.h" // Needed for UniqueID ...
00028 
00029 class vtkPolyData;
00030 class vtkKWLoadSaveDialog;
00031 class vtkMapper;
00032 class vtkMultiProcessController;
00033 class vtkPVInformation;
00034 class vtkPVPart;
00035 class vtkPVPartDisplay;
00036 class vtkSource;
00037 class vtkStringList;
00038 class vtkTimerLog;
00039 class vtkCallbackCommand;
00040 class vtkClientServerInterpreter;
00041 class vtkClientServerStream;
00042 class vtkSocketController;
00043 class vtkKWApplication;
00044 class vtkPVServerInformation;
00045 class vtkPVOptions;
00046 class vtkPVProcessModuleInternals;
00047 
00048 class VTK_EXPORT vtkPVProcessModule : public vtkProcessModule
00049 {
00050 public:
00051   static vtkPVProcessModule* New();
00052   vtkTypeRevisionMacro(vtkPVProcessModule, vtkProcessModule);
00053   void PrintSelf(ostream& os, vtkIndent indent);
00054 
00055   // ParaView.cxx (main) calls this method to setup the processes.
00056   // It currently creates the application, but I will try to pass
00057   // the application as an argument.
00058   virtual int Start(int argc, char **argv);
00059   
00061   virtual void Exit();
00062 
00064 
00066   virtual int GetDirectoryListing(const char* dir, vtkStringList* dirs,
00067                                   vtkStringList* files, int save);
00069   
00071 
00074   virtual vtkObjectBase* GetObjectFromIntID(unsigned int);
00075   //BTX
00076   // Description:
00077   // Return the vtk object associated with the given id for the client.
00078   // If the id is for an object on the server then 0 is returned.
00079   virtual vtkObjectBase* GetObjectFromID(vtkClientServerID);
00080   //ETX
00082 
00087   virtual int LoadModule(const char* name, const char* directory);
00088 
00090 
00091   virtual int LoadModuleInternal(const char* name, const char* directory);
00092   vtkClientServerID GetMPIMToNSocketConnectionID() { return this->MPIMToNSocketConnectionID;}
00094 
00096 
00097   virtual void InitializeInterpreter();
00098   virtual void FinalizeInterpreter();
00100 
00103   vtkSocketController* GetSocketController() { return 0; }
00104 
00106   virtual void SendPrepareProgress();
00107   virtual void SendCleanupPendingProgress();
00109 
00111   void SetLocalProgress(const char* filter, int progress);
00112 
00113   
00115 
00117   void LogStartEvent(char* str);
00118   void LogEndEvent(char* str);
00120 
00122 
00124   void SetLogBufferLength(int length);
00125   void ResetLog();
00126   void SetEnableLog(int flag);
00128 
00130 
00133   vtkSetMacro(LogThreshold, float);
00134   vtkGetMacro(LogThreshold, float);
00136 
00137   // Ivars copied from vtkPVApplication in SetProcessModule method
00138   
00141   vtkPVServerInformation* GetServerInformation() { return this->ServerInformation;}
00142 
00146   void SynchronizeServerClientOptions();
00147 
00149   const char* GetPath(const char* tag, const char* relativePath, const char* file);
00150 
00152 
00156   void SetGlobalLODFlag(int val);
00157   static int GetGlobalLODFlag();
00158   static void SetGlobalLODFlagInternal(int val);
00160 
00162 
00165   void SetGlobalStreamBlock(int val);
00166   static int GetGlobalStreamBlock();
00167   static void SetGlobalStreamBlockInternal(int val);
00169 
00174   virtual void SetProcessEnvironmentVariable(int processId, const char* var);
00175 
00177 
00179   vtkSetMacro(UseTriangleStrips,int);
00180   vtkGetMacro(UseTriangleStrips,int);
00181   vtkSetMacro(UseImmediateMode,int);
00182   vtkGetMacro(UseImmediateMode,int);
00184 
00186 
00187   int GetRenderNodePort();
00188   char* GetMachinesFileName();
00189   int GetClientMode();
00190   unsigned int GetNumberOfMachines();
00191   const char* GetMachineName(unsigned int idx);
00193 
00195 
00196   vtkSetStringMacro(ApplicationInstallationDirectory);
00197   vtkGetStringMacro(ApplicationInstallationDirectory);
00199 
00200 protected:
00201   vtkPVProcessModule();
00202   ~vtkPVProcessModule();
00203 
00204   vtkClientServerID MPIMToNSocketConnectionID;
00205 
00206   // Need to put a global flag that indicates interactive rendering.
00207   // All process must be consistent in choosing LODs because
00208   // of the vtkCollectPolydata filter.
00209   static int GlobalLODFlag;
00210 
00211   // Testing streamoing.
00212   static int GlobalStreamBlock;
00213   
00214   float LogThreshold;
00215   vtkPVServerInformation* ServerInformation;
00216   int UseTriangleStrips;
00217   int UseImmediateMode;
00218   char* ApplicationInstallationDirectory;
00219   vtkTimerLog *Timer;
00220   vtkPVProcessModuleInternals* Internals;
00221 
00222 private:
00223   vtkPVProcessModule(const vtkPVProcessModule&); // Not implemented
00224   void operator=(const vtkPVProcessModule&); // Not implemented
00225 };
00226 
00227 #endif

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