vtkPVDataDeliveryManager.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVDataDeliveryManager
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 =========================================================================*/
29 #ifndef vtkPVDataDeliveryManager_h
30 #define vtkPVDataDeliveryManager_h
31 
32 #include "vtkObject.h"
33 #include "vtkRemotingViewsModule.h" //needed for exports
34 #include "vtkSmartPointer.h" // needed for iVar.
35 #include "vtkTuple.h" // needed for vtkTuple.
36 #include "vtkWeakPointer.h" // needed for iVar.
37 
38 class vtkAlgorithmOutput;
39 class vtkDataObject;
41 class vtkInformation;
42 class vtkPKdTree;
44 class vtkPVView;
45 
46 #include <vector>
47 
48 class VTKREMOTINGVIEWS_EXPORT vtkPVDataDeliveryManager : public vtkObject
49 {
50 public:
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
55 
58  void SetView(vtkPVView*);
59  vtkPVView* GetView() const;
61 
66  int GetSynchronizationMagicNumber();
67 
69 
75  void RegisterRepresentation(vtkPVDataRepresentation* repr);
76  void UnRegisterRepresentation(vtkPVDataRepresentation*);
77  vtkPVDataRepresentation* GetRepresentation(unsigned int);
79 
81 
87  void SetPiece(vtkPVDataRepresentation* repr, vtkDataObject* data, bool low_res,
88  unsigned long trueSize = 0, int port = 0);
90 
92  bool HasPiece(vtkPVDataRepresentation* repr, bool low_res = false, int port = 0);
94 
99  vtkDataObject* GetPiece(vtkPVDataRepresentation* repr, bool low_res, int port = 0);
100 
104  vtkDataObject* GetDeliveredPiece(vtkPVDataRepresentation* repr, bool low_res, int port = 0);
105 
109  void ClearCache(vtkPVDataRepresentation* repr);
110 
112 
118  vtkAlgorithmOutput* GetProducer(vtkPVDataRepresentation*, bool low_res, int port = 0);
120 
122 
126  vtkInformation* GetPieceInformation(vtkPVDataRepresentation* repr, bool low_res, int port = 0);
128 
130 
133  int GetNumberOfPorts(vtkPVDataRepresentation* repr);
135 
142  unsigned long GetVisibleDataSize(bool low_res);
143 
150  bool NeedsDelivery(
151  vtkMTimeType timestamp, std::vector<unsigned int>& keys_to_deliver, bool use_lod);
152 
156  void Deliver(int use_low_res, unsigned int size, unsigned int* keys);
157 
167  virtual int GetDeliveredDataKey(bool low_res) const
168  {
169  (void)low_res;
170  return 0;
171  }
172 
173 protected:
175  ~vtkPVDataDeliveryManager() override;
176 
177  double GetCacheKey(vtkPVDataRepresentation* repr) const;
178 
183  virtual void MoveData(vtkPVDataRepresentation* repr, bool low_res, int port) = 0;
184 
187 
188 private:
190  void operator=(const vtkPVDataDeliveryManager&) = delete;
191 
193 };
194 
195 #endif
196 
197 // VTK-HeaderTest-Exclude: vtkPVDataDeliveryManager.h
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...
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:44
void operator=(const vtkObjectBase &)