ParaView
vtkClientServerMoveData.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkClientServerMoveData.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 =========================================================================*/
29 #ifndef vtkClientServerMoveData_h
30 #define vtkClientServerMoveData_h
31 
32 #include "vtkDataObjectAlgorithm.h"
33 #include "vtkPVClientServerCoreRenderingModule.h" //needed for exports
34 
35 class vtkMultiProcessController;
36 class vtkMultiProcessController;
37 
38 class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkClientServerMoveData : public vtkDataObjectAlgorithm
39 {
40 public:
41  static vtkClientServerMoveData* New();
42  vtkTypeMacro(vtkClientServerMoveData, vtkDataObjectAlgorithm);
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
46 
55  vtkSetMacro(OutputDataType, int);
56  vtkGetMacro(OutputDataType, int);
58 
60 
68  vtkSetVector6Macro(WholeExtent, int);
69  vtkGetVector6Macro(WholeExtent, int);
71 
73 
77  vtkSetMacro(ProcessType, int);
78  vtkGetMacro(ProcessType, int);
80 
82 
87  void SetController(vtkMultiProcessController*);
88  vtkGetObjectMacro(Controller, vtkMultiProcessController);
90 
92  {
93  AUTO = 0,
94  SERVER = 1,
95  CLIENT = 2
96  };
97 
98 protected:
101 
102  // Overridden to mark input as optional, since input data may
103  // not be available on all processes that this filter is instantiated.
104  virtual int FillInputPortInformation(int port, vtkInformation* info);
105 
106  virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
107  vtkInformationVector* outputVector);
108 
109  // Create an output of the type defined by OutputDataType
110  virtual int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector,
111  vtkInformationVector* outputVector);
112 
113  // If there is an input call superclass' RequestInformation
114  // otherwise set the output WHOLE_EXTENT() to be WholeExtent
115  virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
116  vtkInformationVector* outputVector);
117 
118  virtual int SendData(vtkDataObject*, vtkMultiProcessController*);
119  virtual vtkDataObject* ReceiveData(vtkMultiProcessController*);
120 
121  enum Tags
122  {
123  TRANSMIT_DATA_OBJECT = 23483
124  };
125 
127  int WholeExtent[6];
129  vtkMultiProcessController* Controller;
130 
131 private:
132  vtkClientServerMoveData(const vtkClientServerMoveData&) VTK_DELETE_FUNCTION;
133  void operator=(const vtkClientServerMoveData&) VTK_DELETE_FUNCTION;
134 };
135 
136 #endif
Moves data from the server root node to the client.
vtkMultiProcessController * Controller