vtkPVDataRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVDataRepresentation.h
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 =========================================================================*/
24 #ifndef vtkPVDataRepresentation_h
25 #define vtkPVDataRepresentation_h
26 
27 #include "vtkCommand.h" // needed for vtkCommand
28 #include "vtkDataRepresentation.h"
29 #include "vtkRemotingViewsModule.h" // needed for exports
30 #include "vtkWeakPointer.h" // needed for vtkWeakPointer
31 #include <string> // needed for string
32 
34 
36 {
37 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
51  virtual int ProcessViewRequest(
52  vtkInformationRequestKey* request_type, vtkInformation* inInfo, vtkInformation* outInfo);
53 
74  virtual void MarkModified();
75 
89  virtual unsigned int Initialize(unsigned int minIdAvailable, unsigned int maxIdAvailable);
90 
95  unsigned int GetUniqueIdentifier() { return this->UniqueIdentifier; }
96 
101  virtual void SetVisibility(bool val) { this->Visibility = val; }
102  vtkGetMacro(Visibility, bool);
103 
107  virtual vtkDataObject* GetRenderedDataObject(int vtkNotUsed(port))
108  {
109  return this->GetInputDataObject(0, 0);
110  }
111 
113 
116  virtual void SetUpdateTime(double time);
117  vtkGetMacro(UpdateTime, double);
119 
121 
125  vtkGetMacro(UpdateTimeValid, bool);
126  void ResetUpdateTime();
128 
130 
137  virtual void SetForcedCacheKey(double val) { this->ForcedCacheKey = val; }
138  virtual void SetForceUseCache(bool val) { this->ForceUseCache = val; }
139  vtkGetMacro(ForcedCacheKey, double);
140  vtkGetMacro(ForceUseCache, bool);
142 
147  double GetCacheKey() const;
148 
150 
154  bool AddToView(vtkView* view) override;
155  bool RemoveFromView(vtkView* view) override;
157 
166  {
167  return this->GetInternalOutputPort(port, 0);
168  }
169  vtkAlgorithmOutput* GetInternalOutputPort(int port, int conn) override;
170 
174  vtkView* GetView() const;
175 
180  vtkMTimeType GetPipelineDataTime();
181 
183 
187  virtual void SetLogName(const std::string& name) { this->LogName = name; }
188  const std::string& GetLogName() const { return this->LogName; }
190 
192 
203  vtkGetMacro(HasTemporalPipeline, bool);
204  vtkSetMacro(HasTemporalPipeline, bool);
206 
210  bool GetNeedsUpdate();
211 
212  enum
213  {
220  SkippedUpdateDataEvent = vtkCommand::UserEvent + 91,
222  };
223 
225 
228  void SetInputConnection(int port, vtkAlgorithmOutput* input) override;
230  void AddInputConnection(int port, vtkAlgorithmOutput* input) override;
233 
234 protected:
236  ~vtkPVDataRepresentation() override;
237 
242 
247 
248  int RequestUpdateExtent(vtkInformation* request, vtkInformationVector** inputVector,
249  vtkInformationVector* outputVector) override;
250 
252 
253  double UpdateTime;
255  unsigned int UniqueIdentifier;
256 
257 private:
259  void operator=(const vtkPVDataRepresentation&) = delete;
260 
261  bool Visibility;
262  bool ForceUseCache;
263  double ForcedCacheKey;
264  double CacheKey;
265 
266  bool HasTemporalPipeline;
267 
268  class Internals;
269  Internals* Implementation;
271  std::string LogName;
272 };
273 
274 #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...
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 &)