vtkSMStateLocator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMStateLocator.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 vtkSMStateLocator_h
24 #define vtkSMStateLocator_h
25 
26 #include "vtkRemotingServerManagerModule.h" //needed for exports
27 #include "vtkSMMessageMinimal.h" // needed for vtkSMMessage.
28 #include "vtkSMObject.h"
29 #include "vtkWeakPointer.h" // need for observer
30 
31 class vtkSMProxy;
32 class vtkSMSession;
33 class vtkUndoStack;
34 
36 {
37 public:
38  static vtkSMStateLocator* New();
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
43 
47  vtkSetObjectMacro(ParentLocator, vtkSMStateLocator);
48  vtkGetObjectMacro(ParentLocator, vtkSMStateLocator);
50 
55  void InitGarbageCollector(vtkSMSession*, vtkUndoStack*);
56 
64  virtual bool FindState(vtkTypeUInt32 globalID, vtkSMMessage* stateToFill, bool useParent = true);
65 
70  virtual void RegisterState(const vtkSMMessage* state);
71 
76  virtual void UnRegisterState(vtkTypeUInt32 globalID, bool force);
77 
82  virtual void UnRegisterAllStates(bool force);
83 
88  virtual bool IsStateLocal(vtkTypeUInt32 globalID);
89 
93  virtual bool IsStateAvailable(vtkTypeUInt32 globalID);
94 
100  virtual void RegisterFullState(vtkSMProxy* proxy);
101 
102 protected:
104  ~vtkSMStateLocator() override;
105 
109 
110 private:
111  vtkSMStateLocator(const vtkSMStateLocator&) = delete;
112  void operator=(const vtkSMStateLocator&) = delete;
113 
114  class vtkInternal;
115  vtkInternal* Internals;
116 };
117 
118 #endif
undo/redo stack.
Definition: vtkUndoStack.h:47
#define VTKREMOTINGSERVERMANAGER_EXPORT
vtkSMSession is the default ParaView session.
Definition: vtkSMSession.h:34
vtkWeakPointer< vtkSMSession > Session
Header class that setup every thing in order to use Protobuf messages in a transparent manner...
superclass for most server manager classes
Definition: vtkSMObject.h:29
static vtkSMObject * New()
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152
vtkWeakPointer< vtkUndoStack > UndoStack
vtkSMStateLocator * ParentLocator
Class used to retrieve a given message state based on its GlobalID.
void PrintSelf(ostream &os, vtkIndent indent) override