Parallel/vtkSocketController.h Source File

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

# 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 =========================================================================*/
    00046 #ifndef __vtkSocketController_h
    00047 #define __vtkSocketController_h
    00048
    00049 #include "vtkMultiProcessController.h"
    00050
    00051 class vtkSocketCommunicator;
    00052
    00053 class VTK_PARALLEL_EXPORT vtkSocketController : public vtkMultiProcessController
    00054 {
    00055 public:
    00056   static vtkSocketController *New();
    00057   vtkTypeRevisionMacro(vtkSocketController,vtkMultiProcessController);
    00058   void PrintSelf(ostream& os, vtkIndent indent);
    00059
    00061
    00063   virtual void Initialize(int* argc, char*** argv, int)
    00064     { this->Initialize(argc,argv); }
    00065   virtual void Initialize(int* argc, char*** argv);
    00066   virtual void Initialize()
    00067     { this->Initialize(0,0); }
    00069
    00071
    00072   void Finalize() {};
    00073   void Finalize(int) {};
    00075
    00077   void SingleMethodExecute() {};
    00078
    00080   void MultipleMethodExecute() {};
    00081
    00083   void CreateOutputWindow() {};
    00084
    00086   void Barrier() {};
    00087
    00089   virtual void SetNumberOfProcesses(int num);
    00090
    00092   virtual int WaitForConnection(int port);
    00093
    00095   virtual void CloseConnection();
    00096
    00098   virtual int ConnectTo( char* hostName, int port );
    00099
    00100   int GetSwapBytesInReceivedData();
    00101
    00103   void SetCommunicator(vtkSocketCommunicator* comm);
    00104
    00105 //BTX
    00106
    00107   enum Consts {
    00108     ENDIAN_TAG=1010580540 // 0x3c3c3c3c
    00109   };
    00110
    00111 //ETX
    00112
    00113 protected:
    00114
    00115   vtkSocketController();
    00116   ~vtkSocketController();
    00117
    00118   // Initialize only once, finialize on destruction.
    00119   static int Initialized;
    00120 private:
    00121   vtkSocketController(const vtkSocketController&);  // Not implemented.
    00122   void operator=(const vtkSocketController&);  // Not implemented.
    00123 };
    00124
    00125
    00126 #endif // __vtkSocketController_h