vtkPVDataDeliveryManager.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
17 #ifndef vtkPVDataDeliveryManager_h
18 #define vtkPVDataDeliveryManager_h
19 
20 #include "vtkObject.h"
21 #include "vtkRemotingViewsModule.h" //needed for exports
22 #include "vtkSmartPointer.h" // needed for iVar.
23 #include "vtkTuple.h" // needed for vtkTuple.
24 #include "vtkWeakPointer.h" // needed for iVar.
25 
26 class vtkAlgorithmOutput;
27 class vtkDataObject;
29 class vtkInformation;
31 class vtkPVView;
32 
33 #include <vector> // for std::vector
34 
36 {
37 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
42 
45  void SetView(vtkPVView*);
46  vtkPVView* GetView() const;
48 
53  int GetSynchronizationMagicNumber();
54 
56 
62  void RegisterRepresentation(vtkPVDataRepresentation* repr);
63  void UnRegisterRepresentation(vtkPVDataRepresentation*);
64  vtkPVDataRepresentation* GetRepresentation(unsigned int);
66 
68 
74  void SetPiece(vtkPVDataRepresentation* repr, vtkDataObject* data, bool low_res,
75  unsigned long trueSize = 0, int port = 0);
77 
79  bool HasPiece(vtkPVDataRepresentation* repr, bool low_res = false, int port = 0);
81 
86  vtkDataObject* GetPiece(vtkPVDataRepresentation* repr, bool low_res, int port = 0);
87 
91  vtkDataObject* GetDeliveredPiece(vtkPVDataRepresentation* repr, bool low_res, int port = 0);
92 
96  void ClearCache(vtkPVDataRepresentation* repr);
97 
99 
105  vtkAlgorithmOutput* GetProducer(vtkPVDataRepresentation*, bool low_res, int port = 0);
107 
109 
113  vtkInformation* GetPieceInformation(vtkPVDataRepresentation* repr, bool low_res, int port = 0);
115 
117 
120  int GetNumberOfPorts(vtkPVDataRepresentation* repr);
122 
129  unsigned long GetVisibleDataSize(bool low_res);
130 
137  bool NeedsDelivery(
138  vtkMTimeType timestamp, std::vector<unsigned int>& keys_to_deliver, bool use_lod);
139 
143  void Deliver(int use_low_res, unsigned int size, unsigned int* keys);
144 
154  virtual int GetDeliveredDataKey(bool low_res) const
155  {
156  (void)low_res;
157  return 0;
158  }
159 
160 protected:
162  ~vtkPVDataDeliveryManager() override;
163 
164  double GetCacheKey(vtkPVDataRepresentation* repr) const;
165 
170  virtual void MoveData(vtkPVDataRepresentation* repr, bool low_res, int port) = 0;
171 
174 
175 private:
177  void operator=(const vtkPVDataDeliveryManager&) = delete;
178 
180 };
181 
182 #endif
manager for data-delivery.
virtual int GetDeliveredDataKey(bool low_res) const
Views that support changing of which ranks do the rendering at runtime based on things like data size...
#define VTKREMOTINGVIEWS_EXPORT
vtkPVDataRepresentation adds some ParaView specific API to data representations.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
vtkTypeUInt64 vtkMTimeType
baseclass for all ParaView views.
Definition: vtkPVView.h:32
port
void operator=(const vtkObjectBase &)