logical ServerConnection :: BackupDB (char *cpath, char *target, int32 wait_sec ) { logical term = NO; BEGINSEQ if ( StartPause(wait_sec) ) ERROR term = sc_connection->BackupDB(cpath,target); StopPause(); RECOVER term = YES; ENDSEQ return(term); }
void PlayState::HandleEvents(Game &game){ sf::Event pEvent; while (game.window.pollEvent(pEvent)) { if (pEvent.type == sf::Event::Closed) game.setRunning(false); if (pEvent.type == sf::Event::KeyPressed){ if (pEvent.key.code == sf::Keyboard::Escape){ if (!paused) StartPause(); else game.ChangeState(Game::gameStates::MAINMENU); } if (pEvent.key.code == sf::Keyboard::Return && paused) EndPause(); } } }
/** \brief Removes the rigid body with the specified ID. \author dcofer \date 3/2/2011 \param strID ID of the body to remove \param bThrowError If true and ID is not found then it will throw an error. \exception If bThrowError is true and ID is not found. **/ void RemoteControl::RemoveRemoteControlLinkage(std::string strID, bool bThrowError) { int iPos = FindLinkageChildListPos(strID, bThrowError), iLinkPos = -1; RemoteControlLinkage *lpPart = m_aryLinks[iPos]; if(lpPart->InLink()) iLinkPos = FindLinkageChildListPos(m_aryInLinks, strID, bThrowError); else iLinkPos = FindLinkageChildListPos(m_aryOutLinks, strID, bThrowError); StartPause(); if(lpPart->InLink()) m_aryInLinks.RemoveAt(iLinkPos); else m_aryOutLinks.RemoveAt(iLinkPos); m_aryLinks.RemoveAt(iPos); ExitPause(); }
logical ODABAServer :: Pause ( ) { return(StartPause(UNDEF)); }