ParaView
vtkMultiProcessControllerHelper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkMultiProcessControllerHelper.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 vtkMultiProcessControllerHelper_h
25 #define vtkMultiProcessControllerHelper_h
26 
27 #include "vtkObject.h"
28 #include "vtkPVVTKExtensionsCoreModule.h" // needed for export macro
29 #include "vtkSmartPointer.h" // needed for vtkSmartPointer.
30 
31 #include <vector> // needed for std::vector
32 
33 class vtkDataObject;
34 class vtkMultiProcessController;
35 class vtkMultiProcessStream;
36 
37 class VTKPVVTKEXTENSIONSCORE_EXPORT vtkMultiProcessControllerHelper : public vtkObject
38 {
39 public:
40  static vtkMultiProcessControllerHelper* New();
41  vtkTypeMacro(vtkMultiProcessControllerHelper, vtkObject);
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
48  static int ReduceToAll(vtkMultiProcessController* controller, vtkMultiProcessStream& data,
49  void (*operation)(vtkMultiProcessStream& A, vtkMultiProcessStream& B), int tag);
50 
58  static vtkDataObject* MergePieces(vtkDataObject** pieces, unsigned int num_pieces);
59 
63  static bool MergePieces(
64  std::vector<vtkSmartPointer<vtkDataObject> >& pieces, vtkDataObject* result);
65 
66 protected:
69 
70 private:
72  void operator=(const vtkMultiProcessControllerHelper&) VTK_DELETE_FUNCTION;
73 };
74 
75 #endif
76 // VTK-HeaderTest-Exclude: vtkMultiProcessControllerHelper.h
collection of assorted helper routines dealing with communication.