vtkClientServerMoveData.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
3 // SPDX-License-Identifier: BSD-3-Clause
18 #ifndef vtkClientServerMoveData_h
19 #define vtkClientServerMoveData_h
20 
21 #include "vtkDataObjectAlgorithm.h"
22 #include "vtkPVVTKExtensionsFiltersRenderingModule.h" //needed for exports
23 
26 
28  : public vtkDataObjectAlgorithm
29 {
30 public:
31  static vtkClientServerMoveData* New();
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
36 
45  vtkSetMacro(OutputDataType, int);
46  vtkGetMacro(OutputDataType, int);
48 
50 
58  vtkSetVector6Macro(WholeExtent, int);
59  vtkGetVector6Macro(WholeExtent, int);
61 
63 
67  vtkSetMacro(ProcessType, int);
68  vtkGetMacro(ProcessType, int);
70 
72 
77  void SetController(vtkMultiProcessController*);
78  vtkGetObjectMacro(Controller, vtkMultiProcessController);
80 
82  {
83  AUTO = 0,
84  SERVER = 1,
85  CLIENT = 2
86  };
87 
88 protected:
90  ~vtkClientServerMoveData() override;
91 
92  // Overridden to mark input as optional, since input data may
93  // not be available on all processes that this filter is instantiated.
94  int FillInputPortInformation(int port, vtkInformation* info) override;
95 
96  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
97  vtkInformationVector* outputVector) override;
98 
99  // Create an output of the type defined by OutputDataType
100  int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector,
101  vtkInformationVector* outputVector) override;
102 
103  // If there is an input call superclass' RequestInformation
104  // otherwise set the output WHOLE_EXTENT() to be WholeExtent
105  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
106  vtkInformationVector* outputVector) override;
107 
108  virtual int SendData(vtkDataObject*, vtkMultiProcessController*);
109  virtual vtkDataObject* ReceiveData(vtkMultiProcessController*);
110 
111  enum Tags
112  {
113  HAS_DATA_OBJECT_TO_TRANSMIT = 23479,
114  TRANSMIT_DATA_OBJECT = 23483,
115  };
116 
118  int WholeExtent[6];
121 
122 private:
124  void operator=(const vtkClientServerMoveData&) = delete;
125 };
126 
127 #endif
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Moves data from the server root node to the client.
static vtkDataObjectAlgorithm * New()
vtkMultiProcessController * Controller
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
#define VTKPVVTKEXTENSIONSFILTERSRENDERING_EXPORT
virtual int FillInputPortInformation(int port, vtkInformation *info)
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
void operator=(const vtkObjectBase &)