vtkSMParaViewPipelineController.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMParaViewPipelineController.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 =========================================================================*/
41 #ifndef vtkSMParaViewPipelineController_h
42 #define vtkSMParaViewPipelineController_h
43 
44 #include "vtkSMObject.h"
45 
46 #include <string> // for std::string
47 
48 class vtkSMProxy;
49 class vtkSMSession;
51 
53 {
54 public:
57  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
63  virtual bool InitializeSession(vtkSMSession* session);
64 
68  virtual vtkSMProxy* FindTimeKeeper(vtkSMSession* session);
69 
73  virtual vtkSMProxy* FindMaterialLibrary(vtkSMSession* session);
74 
75  //---------------------------------------------------------------------------
81  virtual bool PreInitializeProxy(vtkSMProxy* proxy);
82 
93  virtual bool PostInitializeProxy(vtkSMProxy* proxy);
94 
99  {
100  return this->PreInitializeProxy(proxy) && this->PostInitializeProxy(proxy);
101  }
102 
109  virtual bool FinalizeProxy(vtkSMProxy* proxy);
110 
111  //---------------------------------------------------------------------------
112  // ******* Methods for Pipeline objects like sources/filters/readers ********
113 
127  virtual bool RegisterPipelineProxy(vtkSMProxy* proxy, const char* proxyname);
128  virtual bool RegisterPipelineProxy(vtkSMProxy* proxy)
129  {
130  return this->RegisterPipelineProxy(proxy, nullptr);
131  }
132 
141  virtual bool UnRegisterPipelineProxy(vtkSMProxy* proxy);
142 
143  //---------------------------------------------------------------------------
144  // ******* Methods for Views/Displays *********
145 
152  virtual bool RegisterViewProxy(vtkSMProxy* proxy)
153  {
154  return this->RegisterViewProxy(proxy, nullptr);
155  }
156  virtual bool RegisterViewProxy(vtkSMProxy* proxy, const char* proxyname);
157 
167  virtual bool UnRegisterViewProxy(vtkSMProxy* proxy, bool unregister_representations = true);
168 
174  virtual bool RegisterRepresentationProxy(vtkSMProxy* proxy);
175 
182  virtual bool UnRegisterRepresentationProxy(vtkSMProxy* proxy);
183 
184  //---------------------------------------------------------------------------
185  // ******* Methods for Transfer functions *********
186 
191  virtual bool RegisterColorTransferFunctionProxy(vtkSMProxy* proxy, const char* proxyname);
193  {
194  return this->RegisterColorTransferFunctionProxy(proxy, nullptr);
195  }
196 
200  virtual bool RegisterOpacityTransferFunction(vtkSMProxy* proxy, const char* proxyname);
202  {
203  return this->RegisterOpacityTransferFunction(proxy, nullptr);
204  }
205 
209  virtual bool RegisterTransferFunction2D(vtkSMProxy* proxy, const char* proxyname);
211  {
212  return this->RegisterTransferFunction2D(proxy, nullptr);
213  }
214 
220  virtual bool RegisterLightProxy(vtkSMProxy* proxy, vtkSMProxy* view, const char* proxyname);
221  virtual bool RegisterLightProxy(vtkSMProxy* proxy, vtkSMProxy* view)
222  {
223  return this->RegisterLightProxy(proxy, view, nullptr);
224  }
225 
231  virtual bool RegisterTextureProxy(vtkSMProxy* proxy, const char* filename);
232 
233  //---------------------------------------------------------------------------
234  // ******* Methods for Extractors *********
235 
239  virtual bool RegisterExtractorProxy(vtkSMProxy* proxy, const char* proxyname);
240  virtual bool RegisterExtractorProxy(vtkSMProxy* proxy)
241  {
242  return this->RegisterExtractorProxy(proxy, nullptr);
243  }
244 
245  //---------------------------------------------------------------------------
246  // ******* Methods for Animation *********
247 
251  virtual vtkSMProxy* FindAnimationScene(vtkSMSession* session);
252 
258  virtual vtkSMProxy* GetAnimationScene(vtkSMSession* session);
259 
263  virtual vtkSMProxy* FindTimeAnimationTrack(vtkSMProxy* scene);
264 
269  virtual vtkSMProxy* GetTimeAnimationTrack(vtkSMProxy* scene);
270 
275  virtual bool RegisterAnimationProxy(vtkSMProxy* proxy);
276 
284  virtual bool UnRegisterAnimationProxy(vtkSMProxy* proxy);
285 
286  //---------------------------------------------------------------------------
287  // ******* Methods for Settings *********
288  //
294  virtual void UpdateSettingsProxies(vtkSMSession* session);
295 
296  //---------------------------------------------------------------------------
297  // ****** Methods for cleanup/finalization/deleting ******
298  //
306  virtual bool UnRegisterProxy(vtkSMProxy* proxy);
307 
311  static std::string GetHelperProxyGroupName(vtkSMProxy*);
312 
313 protected:
316 
321  vtkSMProxy* FindProxy(
322  vtkSMSessionProxyManager* pxm, const char* reggroup, const char* xmlgroup, const char* xmltype);
323 
325 
329  virtual bool CreateProxiesForProxyListDomains(vtkSMProxy* proxy);
330  virtual void RegisterProxiesForProxyListDomains(vtkSMProxy* proxy);
332 
336  virtual bool SetupGlobalPropertiesLinks(vtkSMProxy* proxy);
337 
342  virtual bool CreateAnimationHelpers(vtkSMProxy* proxy);
343 
348  virtual bool UnRegisterDependencies(vtkSMProxy* proxy);
349 
355  vtkMTimeType GetInitializationTime(vtkSMProxy*);
356 
358 
362  void ProcessInitializationHelper(vtkSMProxy*, vtkMTimeType initializationTimeStamp);
364 
369  void ProcessInitializationHelperRegistration(vtkSMProxy*);
370 
374  virtual void DoMaterialSetup(vtkSMProxy* proxy);
375 
376 private:
378  void operator=(const vtkSMParaViewPipelineController&) = delete;
380 
381  class vtkInternals;
382  vtkInternals* Internals;
383 };
384 
385 #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
vtkSMSession is the default ParaView session.
Definition: vtkSMSession.h:35
vtkTypeUInt64 vtkMTimeType
virtual bool RegisterTransferFunction2D(vtkSMProxy *proxy)
superclass for most server manager classes
Definition: vtkSMObject.h:29
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:152
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