vtkSMProxyManager.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMProxyManager.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 =========================================================================*/
26 #ifndef vtkSMProxyManager_h
27 #define vtkSMProxyManager_h
28 
29 #include "vtkRemotingServerManagerModule.h" //needed for exports
30 #include "vtkSMObject.h"
31 #include "vtkSmartPointer.h" // Needed for the singleton
32 
33 class vtkPVXMLElement;
34 class vtkSMPluginManager;
35 class vtkSMProxy;
36 class vtkSMProxyLocator;
38 class vtkSMReaderFactory;
39 class vtkSMSession;
41 class vtkSMStateLoader;
43 class vtkSMWriterFactory;
44 
45 class VTKREMOTINGSERVERMANAGER_EXPORT vtkSMProxyManager : public vtkSMObject
46 {
47 public:
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
54  static vtkSMProxyManager* GetProxyManager();
55 
59  static void Finalize();
60 
65  static bool IsInitialized();
66 
72  static int GetVersionMajor();
73 
79  static int GetVersionMinor();
80 
86  static int GetVersionPatch();
87 
91  static const char* GetParaViewSourceVersion();
92 
98  vtkSMSession* GetActiveSession();
99 
101 
106  void SetActiveSession(vtkSMSession* session);
107  void SetActiveSession(vtkIdType sessionId);
109 
113  vtkSMSessionProxyManager* GetActiveSessionProxyManager();
114 
119  vtkSMSessionProxyManager* GetSessionProxyManager(vtkSMSession* session);
120 
122 
127  vtkSMProxy* NewProxy(
128  const char* groupName, const char* proxyName, const char* subProxyName = NULL);
129  void RegisterProxy(const char* groupname, const char* name, vtkSMProxy* proxy);
130  vtkSMProxy* GetProxy(const char* groupname, const char* name);
131  void UnRegisterProxy(const char* groupname, const char* name, vtkSMProxy*);
132  const char* GetProxyName(const char* groupname, unsigned int idx);
133  const char* GetProxyName(const char* groupname, vtkSMProxy* proxy);
135 
137 
141  void SetUndoStackBuilder(vtkSMUndoStackBuilder* builder);
142  vtkGetObjectMacro(UndoStackBuilder, vtkSMUndoStackBuilder);
144 
146 
150  vtkGetObjectMacro(PluginManager, vtkSMPluginManager);
152 
154 
158  vtkGetObjectMacro(ReaderFactory, vtkSMReaderFactory);
160 
162 
166  vtkGetObjectMacro(WriterFactory, vtkSMWriterFactory);
168 
169  enum eventId
170  {
171  ActiveSessionChanged = 9753
172  };
173 
175  {
177  const char* GroupName;
178  const char* ProxyName;
179  // Set when the register/unregister event if fired for registration of
180  // a compound proxy definition.
181  unsigned int Type;
182 
183  enum
184  {
185  PROXY = 0x1,
186  COMPOUND_PROXY_DEFINITION = 0x2,
187  LINK = 0x3,
188  };
189  };
190 
192  {
194  const char* PropertyName;
195  };
196 
198  {
201  };
202 
204  {
207  };
208 
209 protected:
211  ~vtkSMProxyManager() override;
212 #ifndef __WRAP__
213  static vtkSMProxyManager* New();
214 #endif
215 
217 
221  void ConnectionsUpdated(vtkObject*, unsigned long, void*);
222 
227 
228 private:
229  class vtkPXMInternal;
230  vtkPXMInternal* PXMStorage;
231 
232  static vtkSmartPointer<vtkSMProxyManager> Singleton;
233 
234  vtkSMProxyManager(const vtkSMProxyManager&) = delete;
235  void operator=(const vtkSMProxyManager&) = delete;
236 };
237 
238 #endif
vtkSMWriterFactory * WriterFactory
builds server manager undo sets and pushes them on the undo stack.
vtkSMReaderFactory * ReaderFactory
manages ParaView plugins.
vtkSMSession is the default ParaView session.
Definition: vtkSMSession.h:35
int vtkIdType
is a factory for creating a reader proxy based on the filename/extension.
singleton/facade to vtkSMSessionProxyManager
vtkSMPluginManager * PluginManager
superclass for most server manager classes
Definition: vtkSMObject.h:29
vtkSMUndoStackBuilder * UndoStackBuilder
The vtkSMSessionProxyManager is esponsible for creating and managing proxies for a given session.
is a factory or creating a writer based on the data type information from the output port.
static vtkSMObject * New()
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152
is used to locate proxies referred to in state xmls while loading state files.
Utility class to load state from XML.
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
void PrintSelf(ostream &os, vtkIndent indent) override