📄 sessioni.cpp
字号:
// **********************************************************************//// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.//// This copy of Ice is licensed to you under the terms described in the// ICE_LICENSE file included in this distribution.//// **********************************************************************#include <Ice/Ice.h>#include <SessionI.h>using namespace std;using namespace Test;SessionManagerI::SessionManagerI(const TestControllerIPtr& controller): _controller(controller){}Glacier2::SessionPrxSessionManagerI::create(const string&, const Glacier2::SessionControlPrx& sessionControl, const Ice::Current& current){ Glacier2::SessionPrx newSession = Glacier2::SessionPrx::uncheckedCast( current.adapter->addWithUUID(new SessionI(sessionControl, _controller))); _controller->addSession(SessionTuple(newSession, sessionControl)); return newSession;}SessionI::SessionI(const Glacier2::SessionControlPrx& sessionControl, const TestControllerIPtr& controller) : _sessionControl(sessionControl), _controller(controller){ assert(sessionControl);}voidSessionI::destroySession(const Ice::Current& current){ _sessionControl->destroy();}voidSessionI::shutdown(const Ice::Current& current){ current.adapter->getCommunicator()->shutdown();}voidSessionI::destroy(const Ice::Current& current){ _controller->notifyDestroy(_sessionControl); current.adapter->remove(current.id);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -