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 
238  virtual void SetArrayIdNames(
239  const char* vtkNotUsed(pointArray), const char* vtkNotUsed(cellArray)){};
240 
241 protected:
243  ~vtkPVDataRepresentation() override;
244 
249 
254 
255  int RequestUpdateExtent(vtkInformation* request, vtkInformationVector** inputVector,
256  vtkInformationVector* outputVector) override;
257 
259 
260  double UpdateTime;
262  unsigned int UniqueIdentifier;
263 
264 private:
266  void operator=(const vtkPVDataRepresentation&) = delete;
267 
268  bool Visibility;
269  bool ForceUseCache;
270  double ForcedCacheKey;
271  double CacheKey;
272 
273  bool HasTemporalPipeline;
274 
275  class Internals;
276  Internals* Implementation;
278  std::string LogName;
279 };
280 
281 #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 &)