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

vtkSocketController.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkSocketController.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm 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 =========================================================================*/
00030 #ifndef __vtkSocketController_h
00031 #define __vtkSocketController_h
00032 
00033 #include "vtkMultiProcessController.h"
00034 
00035 class vtkSocketCommunicator;
00036 
00037 class VTK_PARALLEL_EXPORT vtkSocketController : public vtkMultiProcessController
00038 {
00039 public:
00040   static vtkSocketController *New();
00041   vtkTypeRevisionMacro(vtkSocketController,vtkMultiProcessController);
00042   void PrintSelf(ostream& os, vtkIndent indent);
00043 
00045 
00047   virtual void Initialize(int* argc, char*** argv, int)
00048     { this->Initialize(argc,argv); }
00049   virtual void Initialize(int* argc, char*** argv); 
00050   virtual void Initialize()
00051     { this->Initialize(0,0); }
00053 
00055 
00056   void Finalize() {};
00057   void Finalize(int) {};
00059 
00061   void SingleMethodExecute() {};
00062   
00064   void MultipleMethodExecute() {};
00065 
00067   void CreateOutputWindow() {};
00068 
00070   void Barrier() {};
00071 
00073   virtual void SetNumberOfProcesses(int num);
00074 
00076   virtual int WaitForConnection(int port);
00077 
00079   virtual void CloseConnection();
00080 
00082   virtual int ConnectTo( char* hostName, int port );
00083 
00084   int GetSwapBytesInReceivedData();
00085 
00087   void SetCommunicator(vtkSocketCommunicator* comm);
00088 
00089 //BTX
00090 
00091   enum Consts {
00092     ENDIAN_TAG=1010580540 // 0x3c3c3c3c
00093   };
00094 
00095 //ETX
00096 
00097 protected:
00098 
00099   vtkSocketController();
00100   ~vtkSocketController();
00101 
00102   // Initialize only once, finialize on destruction.
00103   static int Initialized;
00104 private:
00105   vtkSocketController(const vtkSocketController&);  // Not implemented.
00106   void operator=(const vtkSocketController&);  // Not implemented.
00107 };
00108 
00109 
00110 #endif // __vtkSocketController_h

Generated on Mon Jan 21 23:07:34 2008 for VTK by  doxygen 1.4.3-20050530