ParaView
vtkSMCollaborationManager.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMCollaborationManager.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 =========================================================================*/
39 #ifndef vtkSMCollaborationManager_h
40 #define vtkSMCollaborationManager_h
41 
42 #include "vtkPVServerManagerCoreModule.h" //needed for exports
43 #include "vtkSMMessageMinimal.h" // needed for vtkSMMessage
44 #include "vtkSMRemoteObject.h"
45 
46 class vtkSMProxyLocator;
47 
48 class VTKPVSERVERMANAGERCORE_EXPORT vtkSMCollaborationManager : public vtkSMRemoteObject
49 {
50 public:
54  static vtkTypeUInt32 GetReservedGlobalID();
55 
58  void PrintSelf(ostream& os, vtkIndent indent);
59 
64  virtual vtkTypeUInt32 GetGlobalID();
65 
70  virtual void SetSession(vtkSMSession*);
71 
79  virtual void PromoteToMaster(int clientId);
80 
85  virtual void FollowUser(int clientId);
86 
90  int GetFollowedUser();
91 
95  virtual bool IsMaster();
96 
100  virtual int GetMasterId();
101 
105  virtual int GetUserId();
106 
111  virtual int GetUserId(int index);
112 
116  virtual const char* GetUserLabel(int userID);
117 
121  virtual void SetUserLabel(const char* userName);
122 
126  virtual void SetUserLabel(int userId, const char* userName);
127 
132  virtual int GetNumberOfConnectedClients();
133 
137  void UpdateUserInformations();
138 
140  {
141  CollaborationNotification = 12345,
142  UpdateUserName = 12346,
143  UpdateUserList = 12347,
144  UpdateMasterUser = 12348,
145  FollowUserCamera = 12349,
146  CameraChanged = 12350
147  };
148 
152  void SendToOtherClients(vtkSMMessage* msg);
153 
157  virtual const vtkSMMessage* GetFullState();
158 
163  virtual void LoadState(const vtkSMMessage* msg, vtkSMProxyLocator* locator);
164 
165 protected:
170 
174  virtual ~vtkSMCollaborationManager();
175 
176 private:
177  class vtkInternal;
178  vtkInternal* Internal;
179 
180  vtkSMCollaborationManager(const vtkSMCollaborationManager&) VTK_DELETE_FUNCTION;
181  void operator=(const vtkSMCollaborationManager&) VTK_DELETE_FUNCTION;
182 };
183 #endif // #ifndef vtkSMCollaborationManager_h
virtual void LoadState(const vtkSMMessage *msg, vtkSMProxyLocator *locator)
This method is used to initialise the object to the given state If the definitionOnly Flag is set to ...
vtkSMSession is the default ParaView session.
Definition: vtkSMSession.h:35
Class used to broadcast message from one client to the others.
Header class that setup every thing in order to use Protobuf messages in a transparent manner...
virtual void SetSession(vtkSMSession *)
Override the SetSession so if the object already have an ID we automatically register it to the assoc...
virtual const vtkSMMessage * GetFullState()
This method return the full object state that can be used to create that object from scratch...
is used to locate proxies referred to in state xmls while loading state files.
void PrintSelf(ostream &os, vtkIndent indent)
baseclass for all proxy-objects that have counter parts on server as well as client processes...
virtual vtkTypeUInt32 GetGlobalID()
Get the global unique id for this object.
static vtkSMSessionObject * New()