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 
23 class VTKREMOTINGVIEWS_EXPORT vtkPVDataRepresentation : public vtkDataRepresentation
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
vtkAlgorithm::CreateDefaultExecutive
virtual vtkExecutive * CreateDefaultExecutive()
vtkObjectBase::operator=
void operator=(const vtkObjectBase &)
vtkDataRepresentation::AddToView
virtual bool AddToView(vtkView *vtkNotUsed(view))
vtkPVDataRepresentation::SetLogName
virtual void SetLogName(const std::string &name)
This is solely intended to simplify debugging and use for any other purpose is vehemently discouraged...
Definition: vtkPVDataRepresentation.h:175
vtkPVDataRepresentation::SetForceUseCache
virtual void SetForceUseCache(bool val)
Generally, caching is within the purview of the vtkPVView (and subclasses).
Definition: vtkPVDataRepresentation.h:126
vtkPVDataRepresentation::UpdateTimeValid
bool UpdateTimeValid
Definition: vtkPVDataRepresentation.h:249
vtkInformationVector
vtkPVDataRepresentation::GetInternalOutputPort
vtkAlgorithmOutput * GetInternalOutputPort(int port) override
Definition: vtkPVDataRepresentation.h:153
vtkPVDataRepresentation::SetArrayIdNames
virtual void SetArrayIdNames(const char *vtkNotUsed(pointArray), const char *vtkNotUsed(cellArray))
Specify the array names used for the selection.
Definition: vtkPVDataRepresentation.h:226
vtkPassInputTypeAlgorithm::RequestUpdateTime
virtual int RequestUpdateTime(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkDataRepresentation::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkPVDataRepresentation::UpdateTimeChangedEvent
@ UpdateTimeChangedEvent
Definition: vtkPVDataRepresentation.h:209
vtkPVDataRepresentation::SetVisibility
virtual void SetVisibility(bool val)
Get/Set the visibility for this representation.
Definition: vtkPVDataRepresentation.h:89
vtkCommand.h
vtkDataRepresentation::RemoveFromView
virtual bool RemoveFromView(vtkView *vtkNotUsed(view))
vtkMTimeType
vtkTypeUInt64 vtkMTimeType
vtkPVDataRepresentation::GetLogName
const std::string & GetLogName() const
This is solely intended to simplify debugging and use for any other purpose is vehemently discouraged...
Definition: vtkPVDataRepresentation.h:176
vtkAlgorithm::AddInputConnection
virtual void AddInputConnection(int port, vtkAlgorithmOutput *input)
vtkExecutive
vtkPVDataRepresentation::UniqueIdentifier
unsigned int UniqueIdentifier
Definition: vtkPVDataRepresentation.h:250
vtkDataRepresentation
vtkPVDataRepresentation::SetForcedCacheKey
virtual void SetForcedCacheKey(double val)
Generally, caching is within the purview of the vtkPVView (and subclasses).
Definition: vtkPVDataRepresentation.h:125
vtkAlgorithm::GetInputDataObject
vtkDataObject * GetInputDataObject(int port, int connection)
vtkView
vtkIndent
vtkInformationRequestKey
vtkWeakPointer.h
vtkPVDataRepresentation::GetUniqueIdentifier
unsigned int GetUniqueIdentifier()
Return 0 if the Initialize() method was not called otherwise a unique ID that will be shared across t...
Definition: vtkPVDataRepresentation.h:83
name
name
vtkAlgorithm::SetInputConnection
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
vtkInformation
vtkDataRepresentation::GetInternalOutputPort
virtual vtkAlgorithmOutput * GetInternalOutputPort()
vtkAlgorithmOutput
vtkDataRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkDataRepresentation.h
vtkPVDataRepresentation::GetInternalOutputPort
vtkAlgorithmOutput * GetInternalOutputPort() override
Retrieves an output port for the input data object at the specified port and connection index.
Definition: vtkPVDataRepresentation.h:152
vtkPVDataRepresentation
Definition: vtkPVDataRepresentation.h:23
vtkPassInputTypeAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkDataObject
vtkWeakPointer< vtkView >
vtkPVDataRepresentation::GetRenderedDataObject
virtual vtkDataObject * GetRenderedDataObject(int vtkNotUsed(port))
Returns the data object that is rendered from the given input port.
Definition: vtkPVDataRepresentation.h:95
vtkPVDataRepresentation::UpdateTime
double UpdateTime
Definition: vtkPVDataRepresentation.h:248