00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00022 #ifndef __vtkPVProcessModule_h
00023 #define __vtkPVProcessModule_h
00024
00025 #include "vtkProcessModule.h"
00026
00027 #include "vtkClientServerID.h"
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
00056
00057
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
00076
00077
00078
00079 virtual vtkObjectBase* GetObjectFromID(vtkClientServerID);
00080
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
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
00207
00208
00209 static int GlobalLODFlag;
00210
00211
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&);
00224 void operator=(const vtkPVProcessModule&);
00225 };
00226
00227 #endif