ParaView
vtkSMPropertyLink.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMPropertyLink.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 =========================================================================*/
23 #ifndef vtkSMPropertyLink_h
24 #define vtkSMPropertyLink_h
25 
26 #include "vtkPVServerManagerCoreModule.h" //needed for exports
27 #include "vtkSMLink.h"
28 
29 class vtkSMProperty;
30 class vtkSMPropertyLinkInternals;
31 class vtkSMPropertyLinkObserver;
32 
33 class VTKPVSERVERMANAGERCORE_EXPORT vtkSMPropertyLink : public vtkSMLink
34 {
35 public:
36  static vtkSMPropertyLink* New();
37  vtkTypeMacro(vtkSMPropertyLink, vtkSMLink);
38  void PrintSelf(ostream& os, vtkIndent indent);
39 
41 
50  void AddLinkedProperty(vtkSMProxy* proxy, const char* propertyname, int updateDir);
51  void RemoveLinkedProperty(vtkSMProxy* proxy, const char* propertyname);
53 
55 
58  unsigned int GetNumberOfLinkedObjects();
59  unsigned int GetNumberOfLinkedProperties();
61 
65  vtkSMProperty* GetLinkedProperty(int index);
66 
70  vtkSMProxy* GetLinkedProxy(int index);
71 
75  const char* GetLinkedPropertyName(int index);
76 
78 
82  int GetLinkedObjectDirection(int index);
83  int GetLinkedPropertyDirection(int index);
85 
89  virtual void RemoveAllLinks();
90 
98  virtual void LoadState(const vtkSMMessage* msg, vtkSMProxyLocator* locator);
99 
100 protected:
103 
107  void Synchronize();
108 
109  friend class vtkSMPropertyLinkInternals;
110  friend class vtkSMPropertyLinkObserver;
111 
115  virtual int LoadXMLState(vtkPVXMLElement* linkElement, vtkSMProxyLocator* locator);
116 
120  virtual void SaveXMLState(const char* linkname, vtkPVXMLElement* parent);
121 
122  virtual void UpdateVTKObjects(vtkSMProxy* caller);
123  virtual void PropertyModified(vtkSMProxy* caller, const char* pname);
124  virtual void PropertyModified(vtkSMProperty* property);
125  virtual void UpdateProperty(vtkSMProxy* caller, const char* pname);
126 
130  virtual void UpdateState();
131 
132 private:
133  vtkSMPropertyLinkInternals* Internals;
134  bool ModifyingProperty;
135 
136  vtkSMPropertyLink(const vtkSMPropertyLink&) VTK_DELETE_FUNCTION;
137  void operator=(const vtkSMPropertyLink&) VTK_DELETE_FUNCTION;
138 };
139 
140 #endif
superclass for all SM properties
Header class that setup every thing in order to use Protobuf messages in a transparent manner...
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.
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
static vtkSMSessionObject * New()