void Switchboard::SendAllMessages() { _messagesLocked = true; while (!_messages.empty()) { String frontMessageName = _messages.front()->GetMessageName(); if (_subscribers.find(frontMessageName) != _subscribers.end()) { std::set<MessageListener*>::iterator listenIt = _subscribers[frontMessageName].begin(); while (listenIt != _subscribers[frontMessageName].end()) { (*listenIt)->ReceiveMessage(_messages.front()); listenIt++; } } delete _messages.front(); _messages.pop(); } _messagesLocked = false; for(unsigned int i = 0; i < _deferredRemoves.size(); i++) { UnsubscribeFrom(_deferredRemoves[i]._subscriber, _deferredRemoves[i]._messageType); } _deferredRemoves.clear(); for(unsigned int i = 0; i < _deferredAdds.size(); i++) { SubscribeTo(_deferredAdds[i]._subscriber, _deferredAdds[i]._messageType); } _deferredAdds.clear(); }
void SceneIntersection::Stop() { if (!computeShader) return; SetSphereSize(0.05f); UnsubscribeFrom(EventType::FRAME_AFTER_RENDERING); }
CHTTPURLHandler::~CHTTPURLHandler() {GUCEF_TRACE; if ( NULL != m_httpClient ) { UnsubscribeFrom( m_httpClient ); delete m_httpClient; m_httpClient = NULL; } }
void CXWinGLWindowContext::Shutdown( void ) {GUCEF_TRACE; CORE::CPulseGenerator& pulseGenerator = CORE::CCoreGlobal::Instance()->GetPulseGenerator(); pulseGenerator.RequestStopOfPeriodicUpdates( this ); UnsubscribeFrom( &pulseGenerator ); if ( 0 != m_window.GetWindow() ) { m_window.WindowDestroy(); } }
void CVideoSettingsForm::OnPreLayoutLoad( void ) {GUCE_TRACE; if ( NULL != m_resolutionLabel ) { UnsubscribeFrom( m_resolutionLabel ); m_resolutionLabel = NULL; } if ( NULL != m_resolutionCombobox ) { UnsubscribeFrom( m_resolutionCombobox ); m_resolutionCombobox = NULL; } if ( NULL != m_antiAliasingLabel ) { UnsubscribeFrom( m_antiAliasingLabel ); m_antiAliasingLabel = NULL; } if ( NULL != m_antiAliasingCombobox ) { UnsubscribeFrom( m_antiAliasingCombobox ); m_antiAliasingCombobox = NULL; } if ( NULL != m_fullscreenCheckbox ) { UnsubscribeFrom( m_fullscreenCheckbox ); m_fullscreenCheckbox = NULL; } if ( NULL != m_vSyncCheckbox ) { UnsubscribeFrom( m_vSyncCheckbox ); m_vSyncCheckbox = NULL; } if ( NULL != m_applyButton ) { UnsubscribeFrom( m_applyButton ); m_applyButton = NULL; } }
void CWin32WindowContext::Shutdown( void ) {GUCEF_TRACE; CORE::CPulseGenerator& pulseGenerator = CORE::CCoreGlobal::Instance()->GetPulseGenerator(); pulseGenerator.RequestStopOfPeriodicUpdates( this ); UnsubscribeFrom( &pulseGenerator ); if ( NULL != m_window.GetHwnd() ) { CORE::CMsWin32Window::UnregisterWindowClass( m_window.GetText() ); m_window.WindowDestroy(); } }
void COgreWindowContext::Shutdown( void ) {GUCEF_TRACE; if ( m_initialized ) { CORE::CPulseGenerator& pulseGenerator = CORE::CCoreGlobal::Instance()->GetPulseGenerator(); pulseGenerator.RequestStopOfPeriodicUpdates( this ); UnsubscribeFrom( &pulseGenerator ); if ( NULL != m_osWindow ) { m_osWindow->WindowDestroy(); } m_initialized = false; } }
void CDRNNode::OnNotify( CORE::CNotifier* notifier , const CORE::CEvent& eventid , CORE::CICloneable* eventdata /* = NULL */ ) {GUCEF_TRACE; // Check if the message originated from our own TCP server if ( notifier == &m_tcpServerSocket ) { if ( COMCORE::CTCPServerSocket::ClientConnectedEvent == eventid ) { const COMCORE::CTCPServerSocket::TConnectionInfo& connectionInfo = static_cast< COMCORE::CTCPServerSocket::TClientConnectedEventData* >( eventdata )->GetData(); // Check if a peer validation mechanism has been provided to this node if ( m_peerValidator != NULL ) { // Check if the peer is allowed to connect if ( !m_peerValidator->IsPeerAddressValid( connectionInfo.hostAddress ) ) { connectionInfo.connection->Close(); return; } } //else: assume the peer is allowed to connect CreateLink( *connectionInfo.connection ); } } else if ( COMCORE::CTCPClientSocket::ConnectedEvent == eventid ) { COMCORE::CTCPClientSocket* clientSocket = static_cast< COMCORE::CTCPClientSocket* >( notifier ); UnsubscribeFrom( clientSocket ); CreateLink( *clientSocket ); } }
void SimpleTimer::Stop() { isActive = false; UnsubscribeFrom(EventType::FRAME_UPDATE); }
void SimpleTimer::Reset() { UnsubscribeFrom(EventType::FRAME_UPDATE); }