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 "vtkPVVTKExtensionsFiltersRenderingModule.h" //needed for exports
34 
37 
39  : public vtkDataObjectAlgorithm
40 {
41 public:
42  static vtkClientServerMoveData* New();
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
47 
56  vtkSetMacro(OutputDataType, int);
57  vtkGetMacro(OutputDataType, int);
59 
61 
69  vtkSetVector6Macro(WholeExtent, int);
70  vtkGetVector6Macro(WholeExtent, int);
72 
74 
78  vtkSetMacro(ProcessType, int);
79  vtkGetMacro(ProcessType, int);
81 
83 
88  void SetController(vtkMultiProcessController*);
89  vtkGetObjectMacro(Controller, vtkMultiProcessController);
91 
93  {
94  AUTO = 0,
95  SERVER = 1,
96  CLIENT = 2
97  };
98 
99 protected:
101  ~vtkClientServerMoveData() override;
102 
103  // Overridden to mark input as optional, since input data may
104  // not be available on all processes that this filter is instantiated.
105  int FillInputPortInformation(int port, vtkInformation* info) override;
106 
107  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
108  vtkInformationVector* outputVector) override;
109 
110  // Create an output of the type defined by OutputDataType
111  int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector,
112  vtkInformationVector* outputVector) override;
113 
114  // If there is an input call superclass' RequestInformation
115  // otherwise set the output WHOLE_EXTENT() to be WholeExtent
116  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
117  vtkInformationVector* outputVector) override;
118 
119  virtual int SendData(vtkDataObject*, vtkMultiProcessController*);
120  virtual vtkDataObject* ReceiveData(vtkMultiProcessController*);
121 
122  enum Tags
123  {
124  TRANSMIT_DATA_OBJECT = 23483
125  };
126 
128  int WholeExtent[6];
131 
132 private:
134  void operator=(const vtkClientServerMoveData&) = delete;
135 };
136 
137 #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 &)