vtkSMProxyLink.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
14 #ifndef vtkSMProxyLink_h
15 #define vtkSMProxyLink_h
16 
17 #include "vtkParaViewDeprecation.h"
18 #include "vtkRemotingServerManagerModule.h" //needed for exports
19 #include "vtkSMLink.h"
20 
21 #include <memory> // for unique_ptr
22 
23 struct vtkSMProxyLinkInternals;
24 
26 {
27 public:
28  static vtkSMProxyLink* New();
29  vtkTypeMacro(vtkSMProxyLink, vtkSMLink);
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31 
33  {
34  BLACKLIST = 0,
35  WHITELIST
36  };
37 
45  virtual void AddLinkedProxy(vtkSMProxy* proxy, int updateDir);
46 
51  virtual void LinkProxies(vtkSMProxy* proxy1, vtkSMProxy* proxy2);
52 
56  virtual void LinkProxyPropertyProxies(vtkSMProxy* proxy1, vtkSMProxy* proxy2, const char* pname);
57 
61  virtual void RemoveLinkedProxy(vtkSMProxy* proxy);
62 
66  unsigned int GetNumberOfLinkedObjects() override;
67 
71  vtkSMProxy* GetLinkedProxy(int index) override;
72 
74 
78  int GetLinkedObjectDirection(int index) override;
79  PARAVIEW_DEPRECATED_IN_6_3_0("Please use GetLinkedObjectDirection(int index) instead")
80  int GetLinkedProxyDirection(int index);
82 
84 
93  void AddException(const char* propertyname);
94  void RemoveException(const char* propertyname);
95  void ClearExceptions();
97 
101  void RemoveAllLinks() override;
102 
110  void LoadState(const vtkSMMessage* msg, vtkSMProxyLocator* locator) override;
111 
113 
120  vtkSetMacro(ExceptionBehavior, int);
121  vtkGetMacro(ExceptionBehavior, int);
122  void SetExceptionBehaviorToBlacklist() { this->SetExceptionBehavior(BLACKLIST); }
123  void SetExceptionBehaviorToWhitelist() { this->SetExceptionBehavior(WHITELIST); }
125 
126 protected:
127  vtkSMProxyLink();
128  ~vtkSMProxyLink() override;
129 
134  void UpdateVTKObjects(vtkSMProxy* proxy) override;
135 
141  void PropertyModified(vtkSMProxy* proxy, const char* pname) override;
142 
148  void UpdateProperty(vtkSMProxy* caller, const char* pname) override;
149 
155  virtual std::string GetXMLTagName() { return "ProxyLink"; }
156 
160  void SaveXMLState(const char* linkname, vtkPVXMLElement* parent) override;
161 
165  int LoadXMLState(vtkPVXMLElement* linkElement, vtkSMProxyLocator* locator) override;
166 
170  void UpdateState() override;
171 
172 private:
173  vtkSMProxyLink(const vtkSMProxyLink&) = delete;
174  void operator=(const vtkSMProxyLink&) = delete;
175 
180  bool isPropertyLinked(const char* pname);
181 
182  std::unique_ptr<vtkSMProxyLinkInternals> Internals;
183  int ExceptionBehavior = BLACKLIST;
184 };
185 
186 #endif
#define VTKREMOTINGSERVERMANAGER_EXPORT
Header class that setup every thing in order to use Protobuf messages in a transparent manner...
#define PARAVIEW_DEPRECATED_IN_6_3_0(reason)
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
is used to locate proxies referred to in state xmls while loading state files.
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
#define const
Definition: zconf.h:238
static vtkSMSessionObject * New()