📄 testamdi.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 <TestAMDI.h>#include <Ice/Ice.h>using namespace Test;TestI::TestI(const Ice::ObjectAdapterPtr& adapter) : _adapter(adapter){}voidTestI::baseAsBase_async(const AMD_TestIntf_baseAsBasePtr& cb, const ::Ice::Current&){ Base b; b.b = "Base.b"; cb->ice_exception(b);}voidTestI::unknownDerivedAsBase_async(const AMD_TestIntf_unknownDerivedAsBasePtr& cb, const ::Ice::Current&){ UnknownDerived d; d.b = "UnknownDerived.b"; d.ud = "UnknownDerived.ud"; cb->ice_exception(d);}voidTestI::knownDerivedAsBase_async(const AMD_TestIntf_knownDerivedAsBasePtr& cb, const ::Ice::Current&){ KnownDerived d; d.b = "KnownDerived.b"; d.kd = "KnownDerived.kd"; cb->ice_exception(d);}voidTestI::knownDerivedAsKnownDerived_async(const AMD_TestIntf_knownDerivedAsKnownDerivedPtr& cb, const ::Ice::Current&){ KnownDerived d; d.b = "KnownDerived.b"; d.kd = "KnownDerived.kd"; cb->ice_exception(d);}voidTestI::unknownIntermediateAsBase_async(const AMD_TestIntf_unknownIntermediateAsBasePtr& cb, const ::Ice::Current&){ UnknownIntermediate ui; ui.b = "UnknownIntermediate.b"; ui.ui = "UnknownIntermediate.ui"; cb->ice_exception(ui);}voidTestI::knownIntermediateAsBase_async(const AMD_TestIntf_knownIntermediateAsBasePtr& cb, const ::Ice::Current&){ KnownIntermediate ki; ki.b = "KnownIntermediate.b"; ki.ki = "KnownIntermediate.ki"; cb->ice_exception(ki);}voidTestI::knownMostDerivedAsBase_async(const AMD_TestIntf_knownMostDerivedAsBasePtr& cb, const ::Ice::Current&){ KnownMostDerived kmd; kmd.b = "KnownMostDerived.b"; kmd.ki = "KnownMostDerived.ki"; kmd.kmd = "KnownMostDerived.kmd"; cb->ice_exception(kmd);}voidTestI::knownIntermediateAsKnownIntermediate_async(const AMD_TestIntf_knownIntermediateAsKnownIntermediatePtr& cb, const ::Ice::Current&){ KnownIntermediate ki; ki.b = "KnownIntermediate.b"; ki.ki = "KnownIntermediate.ki"; cb->ice_exception(ki);}voidTestI::knownMostDerivedAsKnownIntermediate_async(const AMD_TestIntf_knownMostDerivedAsKnownIntermediatePtr& cb, const ::Ice::Current&){ KnownMostDerived kmd; kmd.b = "KnownMostDerived.b"; kmd.ki = "KnownMostDerived.ki"; kmd.kmd = "KnownMostDerived.kmd"; cb->ice_exception(kmd);}voidTestI::knownMostDerivedAsKnownMostDerived_async(const AMD_TestIntf_knownMostDerivedAsKnownMostDerivedPtr& cb, const ::Ice::Current&){ KnownMostDerived kmd; kmd.b = "KnownMostDerived.b"; kmd.ki = "KnownMostDerived.ki"; kmd.kmd = "KnownMostDerived.kmd"; cb->ice_exception(kmd);}voidTestI::unknownMostDerived1AsBase_async(const AMD_TestIntf_unknownMostDerived1AsBasePtr& cb, const ::Ice::Current&){ UnknownMostDerived1 umd1; umd1.b = "UnknownMostDerived1.b"; umd1.ki = "UnknownMostDerived1.ki"; umd1.umd1 = "UnknownMostDerived1.umd1"; cb->ice_exception(umd1);}voidTestI::unknownMostDerived1AsKnownIntermediate_async(const AMD_TestIntf_unknownMostDerived1AsKnownIntermediatePtr& cb, const ::Ice::Current&){ UnknownMostDerived1 umd1; umd1.b = "UnknownMostDerived1.b"; umd1.ki = "UnknownMostDerived1.ki"; umd1.umd1 = "UnknownMostDerived1.umd1"; cb->ice_exception(umd1);}voidTestI::unknownMostDerived2AsBase_async(const AMD_TestIntf_unknownMostDerived2AsBasePtr& cb, const ::Ice::Current&){ UnknownMostDerived2 umd2; umd2.b = "UnknownMostDerived2.b"; umd2.ui = "UnknownMostDerived2.ui"; umd2.umd2 = "UnknownMostDerived2.umd2"; cb->ice_exception(umd2);}voidTestI::shutdown_async(const AMD_TestIntf_shutdownPtr& cb, const ::Ice::Current&){ _adapter->getCommunicator()->shutdown(); cb->ice_response();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -