VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkMultiProcessStream.h 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 =========================================================================*/ 00031 #ifndef __vtkMultiProcessStream_h 00032 #define __vtkMultiProcessStream_h 00033 00034 #include "vtkParallelCoreModule.h" // For export macro 00035 #include "vtkObject.h" 00036 #include <vector> // needed for vector. 00037 #include <string> // needed for string. 00038 00039 class VTKPARALLELCORE_EXPORT vtkMultiProcessStream 00040 { 00041 public: 00042 vtkMultiProcessStream(); 00043 vtkMultiProcessStream(const vtkMultiProcessStream&); 00044 ~vtkMultiProcessStream(); 00045 vtkMultiProcessStream& operator=(const vtkMultiProcessStream&); 00046 00048 00049 vtkMultiProcessStream& operator << (double value); 00050 vtkMultiProcessStream& operator << (float value); 00051 vtkMultiProcessStream& operator << (int value); 00052 vtkMultiProcessStream& operator << (char value); 00053 vtkMultiProcessStream& operator << (unsigned int value); 00054 vtkMultiProcessStream& operator << (unsigned char value); 00055 vtkMultiProcessStream& operator << (vtkTypeInt64 value); 00056 vtkMultiProcessStream& operator << (vtkTypeUInt64 value); 00057 vtkMultiProcessStream& operator << (const std::string& value); 00058 vtkMultiProcessStream& operator << (const vtkMultiProcessStream&); 00060 00062 00063 vtkMultiProcessStream& operator >> (double &value); 00064 vtkMultiProcessStream& operator >> (float &value); 00065 vtkMultiProcessStream& operator >> (int &value); 00066 vtkMultiProcessStream& operator >> (char &value); 00067 vtkMultiProcessStream& operator >> (unsigned int &value); 00068 vtkMultiProcessStream& operator >> (unsigned char &value); 00069 vtkMultiProcessStream& operator >> (vtkTypeInt64 &value); 00070 vtkMultiProcessStream& operator >> (vtkTypeUInt64 &value); 00071 vtkMultiProcessStream& operator >> (std::string &value); 00072 vtkMultiProcessStream& operator >> (vtkMultiProcessStream&); 00074 00076 00077 void Push(double array[], unsigned int size); 00078 void Push(float array[], unsigned int size); 00079 void Push(int array[], unsigned int size); 00080 void Push(char array[], unsigned int size); 00081 void Push(unsigned int array[], unsigned int size ); 00082 void Push(unsigned char array[], unsigned int size ); 00083 void Push(vtkTypeInt64 array[], unsigned int size ); 00084 void Push(vtkTypeUInt64 array[], unsigned int size ); 00086 00088 00090 void Pop(double*& array, unsigned int& size); 00091 void Pop(float*& array, unsigned int& size); 00092 void Pop(int*& array, unsigned int& size); 00093 void Pop(char*& array, unsigned int& size); 00094 void Pop(unsigned int*& array, unsigned int& size ); 00095 void Pop(unsigned char*& array, unsigned int& size ); 00096 void Pop(vtkTypeInt64*& array, unsigned int& size ); 00097 void Pop(vtkTypeUInt64*& array, unsigned int& size ); 00099 00100 00102 void Reset(); 00103 00105 int Size(); 00106 00108 bool Empty(); 00109 00111 00114 void GetRawData(std::vector<unsigned char>& data) const; 00115 void GetRawData( unsigned char*& data, unsigned int &size ); 00116 void SetRawData(const std::vector<unsigned char>& data); 00117 void SetRawData(const unsigned char*, unsigned int size); 00119 00120 private: 00121 class vtkInternals; 00122 vtkInternals* Internals; 00123 unsigned char Endianness; 00124 enum 00125 { 00126 BigEndian, 00127 LittleEndian 00128 }; 00129 }; 00130 00131 #endif 00132 00133 00134 // VTK-HeaderTest-Exclude: vtkMultiProcessStream.h