COVISE Core
|
Manages the behaviour of all sharedStates depending on their sharedStateType. More...
#include <SharedStateManager.h>
Public Member Functions | |
SharedStateManager (VrbClientRegistry *reg) | |
~SharedStateManager () | |
VrbClientRegistry * | getRegistry () |
std::pair< SessionID, bool > | add (SharedStateBase *base, SharedStateType mode) |
adds the sharedState to a list depending on its type; Returns the current sessionID and the mute state More... | |
void | remove (SharedStateBase *base) |
removes the sharedState from the list it is in More... | |
void | update (SessionID &privateSessionID, SessionID &publicSessionID, bool muted, bool force=false) |
void | becomeMaster () |
unmutes all sharedStates and makes them send their current value to vrb More... | |
void | frame (double time) |
lets sharedStates send their value if it has changed and their syncInterval allows it More... | |
Static Public Member Functions | |
static SharedStateManager * | instance () |
Private Attributes | |
std::set< SharedStateBase * > | useCouplingMode |
std::set< SharedStateBase * > | alwaysShare |
std::set< SharedStateBase * > | neverShare |
std::set< SharedStateBase * > | shareWithAll |
SessionID | m_privateSessionID |
SessionID | m_publicSessionID |
bool | m_muted |
VrbClientRegistry * | registry |
Static Private Attributes | |
static SharedStateManager * | s_instance = nullptr |
Manages the behaviour of all sharedStates depending on their sharedStateType.
vrb::SharedStateManager::SharedStateManager | ( | VrbClientRegistry * | reg | ) |
vrb::SharedStateManager::~SharedStateManager | ( | ) |
std::pair< SessionID, bool > vrb::SharedStateManager::add | ( | SharedStateBase * | base, |
SharedStateType | mode | ||
) |
adds the sharedState to a list depending on its type; Returns the current sessionID and the mute state
void vrb::SharedStateManager::becomeMaster | ( | ) |
unmutes all sharedStates and makes them send their current value to vrb
void vrb::SharedStateManager::frame | ( | double | time | ) |
lets sharedStates send their value if it has changed and their syncInterval allows it
VrbClientRegistry * vrb::SharedStateManager::getRegistry | ( | ) |
|
static |
void vrb::SharedStateManager::remove | ( | SharedStateBase * | base | ) |
removes the sharedState from the list it is in
void vrb::SharedStateManager::update | ( | SessionID & | privateSessionID, |
SessionID & | publicSessionID, | ||
bool | muted, | ||
bool | force = false |
||
) |
Updates the IDs to which the SharedStates send and from which they receive updates. muted sharedStates will update the local registry but will not send information to vrb If force = true all SharedStates resubscribe, no matter if one of the IDs has changed
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
private |
|
private |