vtkSMParaViewPipelineController.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
29 #ifndef vtkSMParaViewPipelineController_h
30 #define vtkSMParaViewPipelineController_h
31 
32 #include "vtkSMObject.h"
33 
34 #include <string> // for std::string
35 
36 class vtkSMProxy;
37 class vtkSMSession;
39 
41 {
42 public:
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
51  virtual bool InitializeSession(vtkSMSession* session);
52 
56  virtual vtkSMProxy* FindTimeKeeper(vtkSMSession* session);
57 
61  virtual vtkSMProxy* FindMaterialLibrary(vtkSMSession* session);
62 
63  //---------------------------------------------------------------------------
69  virtual bool PreInitializeProxy(vtkSMProxy* proxy);
70 
81  virtual bool PostInitializeProxy(vtkSMProxy* proxy);
82 
87  {
88  return this->PreInitializeProxy(proxy) && this->PostInitializeProxy(proxy);
89  }
90 
97  virtual bool FinalizeProxy(vtkSMProxy* proxy);
98 
99  //---------------------------------------------------------------------------
100  // ******* Methods for Pipeline objects like sources/filters/readers ********
101 
115  virtual bool RegisterPipelineProxy(vtkSMProxy* proxy, const char* proxyname);
116  virtual bool RegisterPipelineProxy(vtkSMProxy* proxy)
117  {
118  return this->RegisterPipelineProxy(proxy, nullptr);
119  }
120 
129  virtual bool UnRegisterPipelineProxy(vtkSMProxy* proxy);
130 
131  //---------------------------------------------------------------------------
132  // ******* Methods for Views/Displays *********
133 
140  virtual bool RegisterViewProxy(vtkSMProxy* proxy)
141  {
142  return this->RegisterViewProxy(proxy, nullptr);
143  }
144  virtual bool RegisterViewProxy(vtkSMProxy* proxy, const char* proxyname);
145 
155  virtual bool UnRegisterViewProxy(vtkSMProxy* proxy, bool unregister_representations = true);
156 
158 
164  {
165  return this->RegisterRepresentationProxy(proxy, nullptr);
166  }
167  virtual bool RegisterRepresentationProxy(vtkSMProxy* proxy, const char* proxyname);
169 
176  virtual bool UnRegisterRepresentationProxy(vtkSMProxy* proxy);
177 
178  //---------------------------------------------------------------------------
179  // ******* Methods for Transfer functions *********
180 
185  virtual bool RegisterColorTransferFunctionProxy(vtkSMProxy* proxy, const char* proxyname);
187  {
188  return this->RegisterColorTransferFunctionProxy(proxy, nullptr);
189  }
190 
194  virtual bool RegisterOpacityTransferFunction(vtkSMProxy* proxy, const char* proxyname);
196  {
197  return this->RegisterOpacityTransferFunction(proxy, nullptr);
198  }
199 
203  virtual bool RegisterTransferFunction2D(vtkSMProxy* proxy, const char* proxyname);
205  {
206  return this->RegisterTransferFunction2D(proxy, nullptr);
207  }
208 
214  virtual bool RegisterLightProxy(vtkSMProxy* proxy, vtkSMProxy* view, const char* proxyname);
215  virtual bool RegisterLightProxy(vtkSMProxy* proxy, vtkSMProxy* view)
216  {
217  return this->RegisterLightProxy(proxy, view, nullptr);
218  }
219 
225  virtual bool RegisterTextureProxy(vtkSMProxy* proxy, const char* filename);
226  virtual bool RegisterTextureProxy(
227  vtkSMProxy* proxy, const char* trivialProducerKeyName, const char* proxyname);
228 
229  //---------------------------------------------------------------------------
230  // ******* Methods for Extractors *********
231 
235  virtual bool RegisterExtractorProxy(vtkSMProxy* proxy, const char* proxyname);
236  virtual bool RegisterExtractorProxy(vtkSMProxy* proxy)
237  {
238  return this->RegisterExtractorProxy(proxy, nullptr);
239  }
240 
241  //---------------------------------------------------------------------------
242  // ******* Methods for Animation *********
243 
247  virtual vtkSMProxy* FindAnimationScene(vtkSMSession* session);
248 
254  virtual vtkSMProxy* GetAnimationScene(vtkSMSession* session);
255 
259  virtual vtkSMProxy* FindTimeAnimationTrack(vtkSMProxy* scene);
260 
265  virtual vtkSMProxy* GetTimeAnimationTrack(vtkSMProxy* scene);
266 
271  virtual bool RegisterAnimationProxy(vtkSMProxy* proxy);
272 
280  virtual bool UnRegisterAnimationProxy(vtkSMProxy* proxy);
281 
282  //---------------------------------------------------------------------------
283  // ******* Methods for Settings *********
284  //
290  virtual void UpdateSettingsProxies(vtkSMSession* session);
291 
292  //---------------------------------------------------------------------------
293  // ****** Methods for cleanup/finalization/deleting ******
294  //
302  virtual bool UnRegisterProxy(vtkSMProxy* proxy);
303 
307  static std::string GetHelperProxyGroupName(vtkSMProxy*);
308 
309 protected:
312 
317  vtkSMProxy* FindProxy(
318  vtkSMSessionProxyManager* pxm, const char* reggroup, const char* xmlgroup, const char* xmltype);
319 
321 
325  virtual bool CreateProxiesForProxyListDomains(vtkSMProxy* proxy);
326  virtual void RegisterProxiesForProxyListDomains(vtkSMProxy* proxy);
328 
332  virtual bool SetupGlobalPropertiesLinks(vtkSMProxy* proxy);
333 
338  virtual bool CreateAnimationHelpers(vtkSMProxy* proxy);
339 
344  virtual bool UnRegisterDependencies(vtkSMProxy* proxy);
345 
351  vtkMTimeType GetInitializationTime(vtkSMProxy*);
352 
354 
358  void ProcessInitializationHelper(vtkSMProxy*, vtkMTimeType initializationTimeStamp);
360 
365  void ProcessInitializationHelperRegistration(vtkSMProxy*);
366 
367 private:
369  void operator=(const vtkSMParaViewPipelineController&) = delete;
371 
372  class vtkInternals;
373  vtkInternals* Internals;
374 };
375 
376 #endif
bool InitializeProxy(vtkSMProxy *proxy)
Convenience method to call PreInitializeProxy and PostInitializeProxy.
Controller that encapsulates control logic for typical ParaView applications.
virtual bool RegisterOpacityTransferFunction(vtkSMProxy *proxy)
#define VTKREMOTINGSERVERMANAGER_EXPORT
virtual bool RegisterRepresentationProxy(vtkSMProxy *proxy)
Registration method for representations to be used after PreInitializeProxy() and PostInitializeProxy...
vtkSMSession is the default ParaView session.
Definition: vtkSMSession.h:22
vtkTypeUInt64 vtkMTimeType
virtual bool RegisterTransferFunction2D(vtkSMProxy *proxy)
superclass for most server manager classes
Definition: vtkSMObject.h:17
The vtkSMSessionProxyManager is esponsible for creating and managing proxies for a given session...
virtual bool RegisterPipelineProxy(vtkSMProxy *proxy)
static vtkSMObject * New()
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
virtual bool RegisterExtractorProxy(vtkSMProxy *proxy)
virtual bool RegisterLightProxy(vtkSMProxy *proxy, vtkSMProxy *view)
virtual bool RegisterColorTransferFunctionProxy(vtkSMProxy *proxy)
virtual bool RegisterViewProxy(vtkSMProxy *proxy)
Use this method after PreInitializeProxy() and PostInitializeProxy() to register a view proxy with th...
void PrintSelf(ostream &os, vtkIndent indent) override