00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00050 #ifndef __vtkCommunicator_h
00051 #define __vtkCommunicator_h
00052
00053 #include "vtkObject.h"
00054
00055 class vtkDataSet;
00056 class vtkImageData;
00057 class vtkDataObject;
00058 class vtkDataArray;
00059
00060 class VTK_PARALLEL_EXPORT vtkCommunicator : public vtkObject
00061 {
00062
00063 public:
00064
00065 vtkTypeRevisionMacro(vtkCommunicator, vtkObject);
00066 void PrintSelf(ostream& os, vtkIndent indent);
00067
00070 virtual int Send(vtkDataObject* data, int remoteHandle, int tag);
00071
00074 virtual int Send(vtkDataArray* data, int remoteHandle, int tag);
00075
00077
00078 virtual int Send(int* data, int length, int remoteHandle, int tag) = 0;
00079 virtual int Send(unsigned long* data, int length, int remoteHandle,
00080 int tag) = 0;
00081 virtual int Send(unsigned char* data, int length, int remoteHandle,
00082 int tag) = 0;
00083 virtual int Send(char* data, int length, int remoteHandle,
00084 int tag) = 0;
00085 virtual int Send(float* data, int length, int remoteHandle,
00086 int tag) = 0;
00087 virtual int Send(double* data, int length, int remoteHandle,
00088 int tag) = 0;
00089 #ifdef VTK_USE_64BIT_IDS
00090 virtual int Send(vtkIdType* data, int length, int remoteHandle,
00091 int tag) = 0;
00093 #endif
00094
00095
00098 virtual int Receive(vtkDataObject* data, int remoteHandle, int tag);
00099
00102 virtual int Receive(vtkDataArray* data, int remoteHandle, int tag);
00103
00105
00107 virtual int Receive(int* data, int length, int remoteHandle,
00108 int tag) = 0;
00109 virtual int Receive(unsigned long* data, int length, int remoteHandle,
00110 int tag) = 0;
00111 virtual int Receive(unsigned char* data, int length, int remoteHandle,
00112 int tag) = 0;
00113 virtual int Receive(char* data, int length, int remoteHandle,
00114 int tag) = 0;
00115 virtual int Receive(float* data, int length, int remoteHandle,
00116 int tag) = 0;
00117 virtual int Receive(double* data, int length, int remoteHandle,
00118 int tag) = 0;
00119 #ifdef VTK_USE_64BIT_IDS
00120 virtual int Receive(vtkIdType* data, int length, int remoteHandle,
00121 int tag) = 0;
00123 #endif
00124
00125 static void SetUseCopy(int useCopy);
00126
00127 protected:
00128
00129 void DeleteAndSetMarshalString(char *str, int strLength);
00130
00131
00132
00133 int WriteObject(vtkDataObject *object);
00134 int ReadObject(vtkDataObject *object);
00135
00136 int WriteDataSet(vtkDataSet *object);
00137 int ReadDataSet(vtkDataSet *object);
00138
00139 int WriteImageData(vtkImageData *object);
00140 int ReadImageData(vtkImageData *object);
00141
00142 int WriteDataArray(vtkDataArray *object);
00143 int ReadDataArray(vtkDataArray *object);
00144
00145 vtkCommunicator();
00146 ~vtkCommunicator();
00147
00148 char *MarshalString;
00149 int MarshalStringLength;
00150
00151 int MarshalDataLength;
00152
00153 static int UseCopy;
00154
00155 private:
00156 vtkCommunicator(const vtkCommunicator&);
00157 void operator=(const vtkCommunicator&);
00158 };
00159
00160 #endif // __vtkCommunicator_h
00161
00162