VTK
vtkMultiProcessStream.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMultiProcessStream.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
24 #ifndef __vtkMultiProcessStream_h
25 #define __vtkMultiProcessStream_h
26 
27 #include "vtkObject.h"
28 #include <vtkstd/vector> // needed for vector.
29 #include <vtkstd/string> // needed for string.
30 
32 {
33 public:
38 
40 
42  vtkMultiProcessStream& operator << (float value);
45  vtkMultiProcessStream& operator << (unsigned int value);
46  vtkMultiProcessStream& operator << (unsigned char value);
47  vtkMultiProcessStream& operator << (vtkTypeInt64 value);
48  vtkMultiProcessStream& operator << (vtkTypeUInt64 value);
52 
54 
55  vtkMultiProcessStream& operator >> (double &value);
56  vtkMultiProcessStream& operator >> (float &value);
57  vtkMultiProcessStream& operator >> (int &value);
58  vtkMultiProcessStream& operator >> (char &value);
59  vtkMultiProcessStream& operator >> (unsigned int &value);
60  vtkMultiProcessStream& operator >> (unsigned char &value);
61  vtkMultiProcessStream& operator >> (vtkTypeInt64 &value);
62  vtkMultiProcessStream& operator >> (vtkTypeUInt64 &value);
63  vtkMultiProcessStream& operator >> (vtkstd::string &value);
66 
68  void Reset();
69 
71 
73  void GetRawData(vtkstd::vector<unsigned char>& data) const;
74  void SetRawData(const vtkstd::vector<unsigned char>& data);
75  void SetRawData(const unsigned char*, unsigned int size);
77 
78 private:
79  class vtkInternals;
80  vtkInternals* Internals;
81  unsigned char Endianness;
82  enum
83  {
84  BigEndian,
85  LittleEndian
86  };
87 };
88 
89 #endif
90 
91 
stream used to pass data across processes using vtkMultiProcessController.
#define VTK_PARALLEL_EXPORT
VTK_COMMON_EXPORT ostream & operator<<(ostream &os, const vtkIndent &o)