COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
SharedStateManager.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef SHAREDSTATEMANAGER_H
9 #define SHAREDSTATEMANAGER_H
10 
11 #include "SharedState.h"
12 #include "SessionID.h"
13 #include <set>
14 
15 
16 
17 namespace covise
18 {
19 class VRBClient;
20 }
21 namespace vrb
22 {
23 class VrbClientRegistry;
26 {
27 public:
30 
31  VrbClientRegistry *getRegistry();
32  static SharedStateManager *instance();
34  std::pair<SessionID, bool> add(SharedStateBase *base, SharedStateType mode);
36  void remove(SharedStateBase *base);
40  void update(SessionID &privateSessionID, SessionID & publicSessionID, bool muted, bool force = false);
42  void becomeMaster();
44  void frame(double time);
45 private:
47  std::set<SharedStateBase *> useCouplingMode, alwaysShare, neverShare, shareWithAll;
50  bool m_muted;
52 };
53 }
54 #endif
GLenum mode
Definition: khronos-glext.h:6908
Definition: SessionID.h:19
Definition: SharedState.h:43
std::set< SharedStateBase * > useCouplingMode
Definition: SharedStateManager.h:47
static SharedStateManager * s_instance
Definition: SharedStateManager.h:46
Definition: VrbClientRegistry.h:24
bool m_muted
Definition: SharedStateManager.h:50
Manages the behaviour of all sharedStates depending on their sharedStateType.
Definition: SharedStateManager.h:25
#define VRBEXPORT
Definition: coExport.h:81
SessionID m_privateSessionID
Definition: SharedStateManager.h:48
SharedStateType
Definition: SharedState.h:35
VrbClientRegistry * registry
Definition: SharedStateManager.h:51
SessionID m_publicSessionID
Definition: SharedStateManager.h:49