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 #include <string> // needed for std::string
34 
35 class vtkPVXMLElement;
36 class vtkSMPluginManager;
37 class vtkSMProxy;
38 class vtkSMProxyLocator;
40 class vtkSMReaderFactory;
41 class vtkSMSession;
43 class vtkSMStateLoader;
45 class vtkSMWriterFactory;
46 
48 {
49 public:
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
56  static vtkSMProxyManager* GetProxyManager();
57 
61  static void Finalize();
62 
67  static bool IsInitialized();
68 
74  static int GetVersionMajor();
75 
81  static int GetVersionMinor();
82 
88  static int GetVersionPatch();
89 
93  static const char* GetParaViewSourceVersion();
94 
100  vtkSMSession* GetActiveSession();
101 
103 
108  void SetActiveSession(vtkSMSession* session);
109  void SetActiveSession(vtkIdType sessionId);
111 
115  vtkSMSessionProxyManager* GetActiveSessionProxyManager();
116 
121  vtkSMSessionProxyManager* GetSessionProxyManager(vtkSMSession* session);
122 
124 
129  vtkSMProxy* NewProxy(
130  const char* groupName, const char* proxyName, const char* subProxyName = NULL);
131  void RegisterProxy(const char* groupname, const char* name, vtkSMProxy* proxy);
132  vtkSMProxy* GetProxy(const char* groupname, const char* name);
133  void UnRegisterProxy(const char* groupname, const char* name, vtkSMProxy*);
134  const char* GetProxyName(const char* groupname, unsigned int idx);
135  const char* GetProxyName(const char* groupname, vtkSMProxy* proxy);
137 
138  vtkSetMacro(BlockProxyDefinitionUpdates, bool);
139  vtkGetMacro(BlockProxyDefinitionUpdates, bool);
140  vtkBooleanMacro(BlockProxyDefinitionUpdates, bool);
141  void UpdateProxyDefinitions();
142 
144 
148  void SetUndoStackBuilder(vtkSMUndoStackBuilder* builder);
149  vtkGetObjectMacro(UndoStackBuilder, vtkSMUndoStackBuilder);
151 
153 
157  vtkGetObjectMacro(PluginManager, vtkSMPluginManager);
159 
161 
165  vtkGetObjectMacro(ReaderFactory, vtkSMReaderFactory);
167 
169 
173  vtkGetObjectMacro(WriterFactory, vtkSMWriterFactory);
175 
176  enum eventId
177  {
178  ActiveSessionChanged = 9753
179  };
180 
182  {
184  const char* GroupName;
185  const char* ProxyName;
186  // Set when the register/unregister event if fired for registration of
187  // a compound proxy definition.
188  unsigned int Type;
189 
190  enum
191  {
192  PROXY = 0x1,
193  COMPOUND_PROXY_DEFINITION = 0x2,
194  LINK = 0x3,
195  };
196  };
197 
199  {
201  const char* PropertyName;
202  };
203 
205  {
208  };
209 
211  {
214  };
215 
224  std::string GetUniqueProxyName(
225  const char* groupname, const char* prefix, bool alwaysAppend = true);
226 
227 protected:
229  ~vtkSMProxyManager() override;
230 #ifndef __WRAP__
231  static vtkSMProxyManager* New();
232 #endif
233 
235 
239  void ConnectionsUpdated(vtkObject*, unsigned long, void*);
240 
245 
247 
248 private:
249  class vtkPXMInternal;
250  vtkPXMInternal* PXMStorage;
251 
252  static vtkSmartPointer<vtkSMProxyManager> Singleton;
253 
254  vtkSMProxyManager(const vtkSMProxyManager&) = delete;
255  void operator=(const vtkSMProxyManager&) = delete;
256 };
257 
258 #endif
vtkSMWriterFactory * WriterFactory
builds server manager undo sets and pushes them on the undo stack.
vtkSMReaderFactory * ReaderFactory
manages ParaView plugins.
#define VTKREMOTINGSERVERMANAGER_EXPORT
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...
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