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

dox/Parallel/vtkSocketController.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkSocketController.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00034 #ifndef __vtkSocketController_h 00035 #define __vtkSocketController_h 00036 00037 #include "vtkMultiProcessController.h" 00038 00039 class vtkSocketCommunicator; 00040 00041 class VTK_PARALLEL_EXPORT vtkSocketController : public vtkMultiProcessController 00042 { 00043 public: 00044 static vtkSocketController *New(); 00045 vtkTypeRevisionMacro(vtkSocketController,vtkMultiProcessController); 00046 void PrintSelf(ostream& os, vtkIndent indent); 00047 00049 00051 virtual void Initialize(int* argc, char*** argv, int) 00052 { this->Initialize(argc,argv); } 00053 virtual void Initialize(int* argc, char*** argv); 00054 virtual void Initialize() 00055 { this->Initialize(0,0); } 00057 00059 00060 void Finalize() {}; 00061 void Finalize(int) {}; 00063 00065 void SingleMethodExecute() {}; 00066 00068 void MultipleMethodExecute() {}; 00069 00071 void CreateOutputWindow() {}; 00072 00074 void Barrier() {}; 00075 00077 virtual void SetNumberOfProcesses(int num); 00078 00080 virtual int WaitForConnection(int port); 00081 00083 virtual void CloseConnection(); 00084 00086 virtual int ConnectTo( char* hostName, int port ); 00087 00088 int GetSwapBytesInReceivedData(); 00089 00091 void SetCommunicator(vtkSocketCommunicator* comm); 00092 00093 //BTX 00094 00095 enum Consts { 00096 ENDIAN_TAG=1010580540 // 0x3c3c3c3c 00097 }; 00098 00099 //ETX 00100 00101 protected: 00102 00103 vtkSocketController(); 00104 ~vtkSocketController(); 00105 00106 // Initialize only once, finialize on destruction. 00107 static int Initialized; 00108 private: 00109 vtkSocketController(const vtkSocketController&); // Not implemented. 00110 void operator=(const vtkSocketController&); // Not implemented. 00111 }; 00112 00113 00114 #endif // __vtkSocketController_h