ParaView
vtkSMSelectionLink.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMSelectionLink.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 vtkSMSelectionLink_h
24 #define vtkSMSelectionLink_h
25 
26 #include "vtkPVServerManagerCoreModule.h" //needed for exports
27 #include "vtkSMLink.h"
28 
29 class vtkSMSourceProxy;
30 class vtkSMSelectionLinkInternals;
31 class vtkSMSelectionLinkObserver;
32 
33 class VTKPVSERVERMANAGERCORE_EXPORT vtkSMSelectionLink : public vtkSMLink
34 {
35 public:
36  static vtkSMSelectionLink* New();
37  vtkTypeMacro(vtkSMSelectionLink, vtkSMLink);
38  void PrintSelf(ostream& os, vtkIndent indent);
39 
41 
50  void AddLinkedSelection(vtkSMProxy* proxy, int updateDir);
51  void RemoveLinkedSelection(vtkSMProxy* proxy);
53 
57  unsigned int GetNumberOfLinkedObjects();
58 
62  vtkSMProxy* GetLinkedProxy(int index);
63 
68  int GetLinkedObjectDirection(int index);
69 
73  virtual void RemoveAllLinks();
74 
78  virtual void LoadState(const vtkSMMessage* msg, vtkSMProxyLocator* locator);
79 
80 protected:
83 
84  friend class vtkSMSelectionLinkInternals;
85  friend class vtkSMSelectionLinkObserver;
86 
90  virtual int LoadXMLState(vtkPVXMLElement* linkElement, vtkSMProxyLocator* locator);
91 
95  virtual void SaveXMLState(const char* linkname, vtkPVXMLElement* parent);
96 
100  virtual void UpdateVTKObjects(vtkSMProxy* vtkNotUsed(caller)){};
101 
105  virtual void PropertyModified(vtkSMProxy* vtkNotUsed(caller), const char* vtkNotUsed(pname)){};
106 
110  virtual void UpdateProperty(vtkSMProxy* vtkNotUsed(caller), const char* vtkNotUsed(pname)){};
111 
115  virtual void SelectionModified(vtkSMSourceProxy* caller, unsigned int portIndex);
116 
120  virtual void UpdateState();
121 
122 private:
123  vtkSMSelectionLinkInternals* Internals;
124 
125  // lock flag to prevent multiple selection modification at the same time
126  bool ModifyingSelection;
127 
128  vtkSMSelectionLink(const vtkSMSelectionLink&) VTK_DELETE_FUNCTION;
129  void operator=(const vtkSMSelectionLink&) VTK_DELETE_FUNCTION;
130 };
131 #endif
Header class that setup every thing in order to use Protobuf messages in a transparent manner...
proxy for a VTK source on a server
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()