vtkPVDataRepresentation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
12 #ifndef vtkPVDataRepresentation_h
13 #define vtkPVDataRepresentation_h
14 
15 #include "vtkCommand.h" // needed for vtkCommand
16 #include "vtkDataRepresentation.h"
17 #include "vtkRemotingViewsModule.h" // needed for exports
18 #include "vtkWeakPointer.h" // needed for vtkWeakPointer
19 #include <string> // needed for string
20 
22 
24 {
25 public:
27  void PrintSelf(ostream& os, vtkIndent indent) override;
28 
39  virtual int ProcessViewRequest(
40  vtkInformationRequestKey* request_type, vtkInformation* inInfo, vtkInformation* outInfo);
41 
62  virtual void MarkModified();
63 
77  virtual unsigned int Initialize(unsigned int minIdAvailable, unsigned int maxIdAvailable);
78 
83  unsigned int GetUniqueIdentifier() { return this->UniqueIdentifier; }
84 
89  virtual void SetVisibility(bool val) { this->Visibility = val; }
90  vtkGetMacro(Visibility, bool);
91 
95  virtual vtkDataObject* GetRenderedDataObject(int vtkNotUsed(port))
96  {
97  return this->GetInputDataObject(0, 0);
98  }
99 
101 
104  virtual void SetUpdateTime(double time);
105  vtkGetMacro(UpdateTime, double);
107 
109 
113  vtkGetMacro(UpdateTimeValid, bool);
114  void ResetUpdateTime();
116 
118 
125  virtual void SetForcedCacheKey(double val) { this->ForcedCacheKey = val; }
126  virtual void SetForceUseCache(bool val) { this->ForceUseCache = val; }
127  vtkGetMacro(ForcedCacheKey, double);
128  vtkGetMacro(ForceUseCache, bool);
130 
135  double GetCacheKey() const;
136 
138 
142  bool AddToView(vtkView* view) override;
143  bool RemoveFromView(vtkView* view) override;
145 
154  {
155  return this->GetInternalOutputPort(port, 0);
156  }
157  vtkAlgorithmOutput* GetInternalOutputPort(int port, int conn) override;
158 
162  vtkView* GetView() const;
163 
168  vtkMTimeType GetPipelineDataTime();
169 
171 
175  virtual void SetLogName(const std::string& name) { this->LogName = name; }
176  const std::string& GetLogName() const { return this->LogName; }
178 
180 
191  vtkGetMacro(HasTemporalPipeline, bool);
192  vtkSetMacro(HasTemporalPipeline, bool);
194 
198  bool GetNeedsUpdate();
199 
200  enum
201  {
208  SkippedUpdateDataEvent = vtkCommand::UserEvent + 91,
210  };
211 
213 
216  void SetInputConnection(int port, vtkAlgorithmOutput* input) override;
218  void AddInputConnection(int port, vtkAlgorithmOutput* input) override;
221 
226  virtual void SetArrayIdNames(
227  const char* vtkNotUsed(pointArray), const char* vtkNotUsed(cellArray)){};
228 
229 protected:
231  ~vtkPVDataRepresentation() override;
232 
237 
242 
243  int RequestUpdateExtent(vtkInformation* request, vtkInformationVector** inputVector,
244  vtkInformationVector* outputVector) override;
245 
247 
248  double UpdateTime;
250  unsigned int UniqueIdentifier;
251 
252 private:
254  void operator=(const vtkPVDataRepresentation&) = delete;
255 
256  bool Visibility;
257  bool ForceUseCache;
258  double ForcedCacheKey;
259  double CacheKey;
260 
261  bool HasTemporalPipeline;
262 
263  class Internals;
264  Internals* Implementation;
266  std::string LogName;
267 };
268 
269 #endif
virtual vtkAlgorithmOutput * GetInternalOutputPort()
vtkAlgorithmOutput * GetInternalOutputPort(int port) override
virtual vtkDataObject * GetRenderedDataObject(int vtkNotUsed(port))
Returns the data object that is rendered from the given input port.
vtkDataObject * GetInputDataObject(int port, int connection)
virtual vtkExecutive * CreateDefaultExecutive()
#define VTKREMOTINGVIEWS_EXPORT
virtual void SetLogName(const std::string &name)
This is solely intended to simplify debugging and use for any other purpose is vehemently discouraged...
virtual void SetArrayIdNames(const char *vtkNotUsed(pointArray), const char *vtkNotUsed(cellArray))
Specify the array names used for the selection.
vtkPVDataRepresentation adds some ParaView specific API to data representations.
virtual void SetForceUseCache(bool val)
Generally, caching is within the purview of the vtkPVView (and subclasses).
const std::string & GetLogName() const
This is solely intended to simplify debugging and use for any other purpose is vehemently discouraged...
virtual bool AddToView(vtkView *vtkNotUsed(view))
virtual void SetVisibility(bool val)
Get/Set the visibility for this representation.
vtkTypeUInt64 vtkMTimeType
virtual int RequestUpdateTime(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
unsigned int GetUniqueIdentifier()
Return 0 if the Initialize() method was not called otherwise a unique ID that will be shared across t...
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual bool RemoveFromView(vtkView *vtkNotUsed(view))
time
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
void PrintSelf(ostream &os, vtkIndent indent)
virtual void SetForcedCacheKey(double val)
Generally, caching is within the purview of the vtkPVView (and subclasses).
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkAlgorithmOutput * GetInternalOutputPort() override
Retrieves an output port for the input data object at the specified port and connection index...
port
virtual void AddInputConnection(int port, vtkAlgorithmOutput *input)
void operator=(const vtkObjectBase &)