本文整理汇总了C++中ice::AsyncResultPtr类的典型用法代码示例。如果您正苦于以下问题:C++ AsyncResultPtr类的具体用法?C++ AsyncResultPtr怎么用?C++ AsyncResultPtr使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AsyncResultPtr类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: opString
void opString(const Ice::AsyncResultPtr& result)
{
string cmp = testString;
if(_useCookie)
{
CookiePtr cookie = CookiePtr::dynamicCast(result->getCookie());
cmp = cookie->getString();
}
Ice::ByteSeq outParams;
if(result->getProxy()->end_ice_invoke(outParams, result))
{
Ice::InputStream in(_communicator, result->getProxy()->ice_getEncodingVersion(), outParams);
in.startEncapsulation();
string s;
in.read(s);
test(s == cmp);
in.read(s);
test(s == cmp);
in.endEncapsulation();
called();
}
else
{
test(false);
}
}
开发者ID:ming-hai,项目名称:ice,代码行数:27,代码来源:AllTests.cpp
示例2: opException
void opException(const Ice::AsyncResultPtr& result)
{
if(_useCookie)
{
CookiePtr cookie = CookiePtr::dynamicCast(result->getCookie());
test(cookie->getString() == testString);
}
Ice::ByteSeq outParams;
if(result->getProxy()->end_ice_invoke(outParams, result))
{
test(false);
}
else
{
Ice::InputStreamPtr in = Ice::createInputStream(_communicator, outParams);
try
{
in->throwException();
}
catch(const Test::MyException&)
{
called();
}
catch(...)
{
test(false);
}
}
}
开发者ID:bholl,项目名称:zeroc-ice,代码行数:30,代码来源:AllTests.cpp
示例3: opString
void opString(const Ice::AsyncResultPtr& result)
{
string cmp = testString;
if(_useCookie)
{
CookiePtr cookie = CookiePtr::dynamicCast(result->getCookie());
cmp = cookie->getString();
}
Ice::ByteSeq outParams;
if(result->getProxy()->end_ice_invoke(outParams, result))
{
Ice::InputStreamPtr in = Ice::createInputStream(_communicator, outParams);
string s;
in->read(s);
test(s == cmp);
in->read(s);
test(s == cmp);
called();
}
else
{
test(false);
};
}
开发者ID:bholl,项目名称:zeroc-ice,代码行数:25,代码来源:AllTests.cpp
示例4: catch
::std::string
IceProxy::com::pera::base::runtime::remote::RobotRemoteService::end_runLocalRobotStart(const ::Ice::AsyncResultPtr& __result)
{
::Ice::AsyncResult::__check(__result, this, __com__pera__base__runtime__remote__RobotRemoteService__runLocalRobotStart_name);
::std::string __ret;
bool __ok = __result->__wait();
try
{
if(!__ok)
{
try
{
__result->__throwUserException();
}
catch(const ::com::pera::base::runtime::remote::RemoteException&)
{
throw;
}
catch(const ::Ice::UserException& __ex)
{
throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());
}
}
::IceInternal::BasicStream* __is = __result->__startReadParams();
__is->read(__ret);
__result->__endReadParams();
return __ret;
}
catch(const ::Ice::LocalException& ex)
{
__result->__getObserver().failed(ex.ice_name());
throw;
}
}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:34,代码来源:RobotRemoteService.cpp
示例5: opException
void opException(const Ice::AsyncResultPtr& result)
{
if(_useCookie)
{
CookiePtr cookie = CookiePtr::dynamicCast(result->getCookie());
test(cookie->getString() == testString);
}
Ice::ByteSeq outParams;
if(result->getProxy()->end_ice_invoke(outParams, result))
{
test(false);
}
else
{
Ice::InputStream in(_communicator, result->getProxy()->ice_getEncodingVersion(), outParams);
in.startEncapsulation();
try
{
in.throwException();
}
catch(const Test::MyException&)
{
in.endEncapsulation();
called();
}
catch(...)
{
test(false);
}
}
}
开发者ID:ming-hai,项目名称:ice,代码行数:32,代码来源:AllTests.cpp
示例6: catch
::RoboCompGetAprilTags::listaMarcas
IceProxy::RoboCompGetAprilTags::GetAprilTags::end_checkMarcas(const ::Ice::AsyncResultPtr& __result)
{
::Ice::AsyncResult::__check(__result, this, __RoboCompGetAprilTags__GetAprilTags__checkMarcas_name);
::RoboCompGetAprilTags::listaMarcas __ret;
bool __ok = __result->__wait();
try
{
if(!__ok)
{
try
{
__result->__throwUserException();
}
catch(const ::Ice::UserException& __ex)
{
throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());
}
}
::IceInternal::BasicStream* __is = __result->__startReadParams();
__is->read(__ret);
__result->__endReadParams();
return __ret;
}
catch(const ::Ice::LocalException& ex)
{
__result->__getObserver().failed(ex.ice_name());
throw;
}
}
开发者ID:adiazser,项目名称:Robotica1,代码行数:30,代码来源:GetAprilTags.cpp
示例7: catch
bool
IceProxy::RoboCompPlanning::Planning::end_getNextAction(::RoboCompPlanning::Plan& solution, const ::Ice::AsyncResultPtr& __result)
{
::Ice::AsyncResult::__check(__result, this, __RoboCompPlanning__Planning__getNextAction_name);
bool __ret;
bool __ok = __result->__wait();
try
{
if(!__ok)
{
try
{
__result->__throwUserException();
}
catch(const ::RoboCompPlanning::ServerException&)
{
throw;
}
catch(const ::Ice::UserException& __ex)
{
throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());
}
}
::IceInternal::BasicStream* __is = __result->__startReadParams();
__is->read(solution);
__is->read(__ret);
__result->__endReadParams();
return __ret;
}
catch(const ::Ice::LocalException& ex)
{
__result->__getObserver().failed(ex.ice_name());
throw;
}
}
开发者ID:bigjun,项目名称:robocomp-people-detection,代码行数:35,代码来源:Planning.cpp
示例8: catch
void
IceProxy::OWSMODULE::DataOperation::end_CheckState(::OWSMODULE::OWSTask& task, const ::Ice::AsyncResultPtr& __result)
{
::Ice::AsyncResult::__check(__result, this, __OWSMODULE__DataOperation__CheckState_name);
bool __ok = __result->__wait();
try
{
if(!__ok)
{
try
{
__result->__throwUserException();
}
catch(const ::Ice::UserException& __ex)
{
throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());
}
}
::IceInternal::BasicStream* __is = __result->__startReadParams();
__is->read(task);
__result->__endReadParams();
}
catch(const ::Ice::LocalException& ex)
{
__result->__getObserver().failed(ex.ice_name());
throw;
}
}
开发者ID:douxiaozhao,项目名称:WMTS,代码行数:28,代码来源:OWS.cpp
示例9: catch
::Ice::Int
IceProxy::CoreSpace::CoreBase::end_sub(const ::Ice::AsyncResultPtr& __result)
{
::Ice::AsyncResult::__check(__result, this, __CoreSpace__CoreBase__sub_name);
::Ice::Int __ret;
bool __ok = __result->__wait();
try
{
if(!__ok)
{
try
{
__result->__throwUserException();
}
catch(const ::Ice::UserException& __ex)
{
throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());
}
}
::IceInternal::BasicStream* __is = __result->__startReadParams();
__is->read(__ret);
__result->__endReadParams();
return __ret;
}
catch(const ::Ice::LocalException& ex)
{
__result->__getObserver().failed(ex.ice_name());
throw;
}
}
开发者ID:cugxiangzhenwei,项目名称:MySrcCode,代码行数:30,代码来源:IceCore.cpp
示例10: catch
void
IceProxy::RoboCompGenericBase::GenericBase::end_getBasePose(::Ice::Int& x, ::Ice::Int& z, ::Ice::Float& alpha, const ::Ice::AsyncResultPtr& __result)
{
::Ice::AsyncResult::__check(__result, this, __RoboCompGenericBase__GenericBase__getBasePose_name);
bool __ok = __result->__wait();
try
{
if(!__ok)
{
try
{
__result->__throwUserException();
}
catch(const ::RoboCompGenericBase::HardwareFailedException&)
{
throw;
}
catch(const ::Ice::UserException& __ex)
{
throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());
}
}
::IceInternal::BasicStream* __is = __result->__startReadParams();
__is->read(x);
__is->read(z);
__is->read(alpha);
__result->__endReadParams();
}
catch(const ::Ice::LocalException& ex)
{
__result->__getObserver().failed(ex.ice_name());
throw;
}
}
开发者ID:vzccristian,项目名称:roboticaCC,代码行数:34,代码来源:GenericBase.cpp
示例11: catch
::std::string
IceProxy::pera::Demo601Server::PeraDemo601ServerService::end_InvokeMethod(const ::Ice::AsyncResultPtr& __result)
{
::Ice::AsyncResult::__check(__result, this, __pera__Demo601Server__PeraDemo601ServerService__InvokeMethod_name);
::std::string __ret;
bool __ok = __result->__wait();
try
{
if(!__ok)
{
try
{
__result->__throwUserException();
}
catch(const ::pera::Demo601Server::InvokeException&)
{
throw;
}
catch(const ::Ice::UserException& __ex)
{
throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());
}
}
::IceInternal::BasicStream* __is = __result->__startReadParams();
__is->read(__ret);
__result->__endReadParams();
return __ret;
}
catch(const ::Ice::LocalException& ex)
{
__result->__getObserver().failed(ex.ice_name());
throw;
}
}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:34,代码来源:Pera601DemoServerIce.cpp
示例12: catch
bool
IceProxy::kelp::cmd2kcn::end_delSelfConfig(const ::Ice::AsyncResultPtr& __result)
{
::Ice::AsyncResult::__check(__result, this, __kelp__cmd2kcn__delSelfConfig_name);
bool __ret;
bool __ok = __result->__wait();
try
{
if(!__ok)
{
try
{
__result->__throwUserException();
}
catch(const ::Ice::UserException& __ex)
{
throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());
}
}
::IceInternal::BasicStream* __is = __result->__startReadParams();
__is->read(__ret);
__result->__endReadParams();
return __ret;
}
catch(const ::Ice::LocalException& ex)
{
__result->__getObserver().failed(ex.ice_name());
throw;
}
}
开发者ID:keyboard-man,项目名称:kelp,代码行数:30,代码来源:cmd2kcn.cpp
示例13: catch
void
IceProxy::RoboCompJoyStick::JoyStick::end_readJoyStickBufferedData(::RoboCompJoyStick::JoyStickBufferedData& gbd, const ::Ice::AsyncResultPtr& __result)
{
::Ice::AsyncResult::__check(__result, this, __RoboCompJoyStick__JoyStick__readJoyStickBufferedData_name);
bool __ok = __result->__wait();
try
{
if(!__ok)
{
try
{
__result->__throwUserException();
}
catch(const ::Ice::UserException& __ex)
{
throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());
}
}
::IceInternal::BasicStream* __is = __result->__startReadParams();
__is->read(gbd);
__result->__endReadParams();
}
catch(const ::Ice::LocalException& ex)
{
__result->__getObserver().failed(ex.ice_name());
throw;
}
}
开发者ID:robocomp,项目名称:robocomp-agm-basic,代码行数:28,代码来源:JoyStick.cpp
示例14: if
void
SubscriberOneway::flush()
{
IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(_lock);
//
// If the subscriber isn't online we're done.
//
if(_state != SubscriberStateOnline || _events.empty())
{
return;
}
// Send up to _maxOutstanding pending events.
while(_outstanding < _maxOutstanding && !_events.empty())
{
//
// Dequeue the head event, count one more outstanding AMI
// request.
//
EventDataPtr e = _events.front();
_events.erase(_events.begin());
if(_observer)
{
_observer->outstanding(1);
}
try
{
Ice::AsyncResultPtr result = _obj->begin_ice_invoke(
e->op, e->mode, e->data, e->context, Ice::newCallback_Object_ice_invoke(this,
&SubscriberOneway::exception,
&SubscriberOneway::sent));
if(!result->sentSynchronously())
{
++_outstanding;
}
else if(_observer)
{
_observer->delivered(1);
}
}
catch(const Ice::Exception& ex)
{
error(true, ex);
return;
}
}
if(_events.empty() && _outstanding == 0 && _shutdown)
{
_lock.notify();
}
}
开发者ID:zeroc-ice,项目名称:ice-debian-packaging,代码行数:54,代码来源:Subscriber.cpp
示例15:
::std::string IceProxy::zerocexample::MessageIce::end_getContent(const ::Ice::AsyncResultPtr& __result)
{
::Ice::AsyncResult::__check(__result, this, __zerocexample__MessageIce__getContent_name);
::std::string __ret;
if (!__result->__wait())
{
try
{
__result->__throwUserException();
}
catch (const ::Ice::UserException& __ex)
{
throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());
}
}
::IceInternal::BasicStream* __is = __result->__startReadParams();
__is->read(__ret);
__result->__endReadParams();
return __ret;
}
开发者ID:rachwal,项目名称:RMI,代码行数:20,代码来源:message.cpp
示例16: catch
void
IceProxy::GlobalTable::DistributedMap::end_putNget(::std::string& counts, const ::Ice::AsyncResultPtr& __result)
{
::Ice::AsyncResult::__check(__result, this, __GlobalTable__DistributedMap__putNget_name);
if(!__result->__wait())
{
try
{
__result->__throwUserException();
}
catch(const ::Ice::UserException& __ex)
{
throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());
}
}
::IceInternal::BasicStream* __is = __result->__getIs();
__is->startReadEncaps();
__is->read(counts);
__is->endReadEncaps();
}
开发者ID:azybler,项目名称:Yahoo_LDA,代码行数:20,代码来源:DistributedMap.cpp
示例17: UnknownUserException
void
IceProxy::Ice::Object::__end(const ::Ice::AsyncResultPtr& __result, const std::string& operation) const
{
AsyncResult::__check(__result, this, operation);
bool __ok = __result->__wait();
if(_reference->getMode() == Reference::ModeTwoway)
{
if(!__ok)
{
try
{
__result->__throwUserException();
}
catch(const UserException& __ex)
{
throw UnknownUserException(__FILE__, __LINE__, __ex.ice_id());
}
}
__result->__readEmptyParams();
}
}
开发者ID:lmtoo,项目名称:ice,代码行数:21,代码来源:Proxy.cpp
示例18: catch
::MCS::LocFoup
IceProxy::MCS::MESLink::end_GetFoup(const ::Ice::AsyncResultPtr& __result)
{
::Ice::AsyncResult::__check(__result, this, __MCS__MESLink__GetFoup_name);
::MCS::LocFoup __ret;
if(!__result->__wait())
{
try
{
__result->__throwUserException();
}
catch(const ::Ice::UserException& __ex)
{
throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());
}
}
::IceInternal::BasicStream* __is = __result->__getIs();
__is->startReadEncaps();
__ret.__read(__is);
__is->endReadEncaps();
return __ret;
}
开发者ID:marylucey97,项目名称:SyAutoH,代码行数:22,代码来源:iMesLink.cpp
示例19: finished
void
NodeI::Update::completed(const Ice::AsyncResultPtr& result)
{
try
{
result->throwLocalException();
finished(true);
}
catch(const Ice::LocalException&)
{
finished(false);
}
}
开发者ID:chenbk85,项目名称:ice,代码行数:13,代码来源:NodeI.cpp
示例20: completed
virtual void
completed(const ::Ice::AsyncResultPtr& result) const
{
try
{
AsyncResult::__check(result, _communicator.get(), __flushBatchRequests_name);
result->__wait();
}
catch(const ::Ice::Exception&)
{
_exception(current_exception());
}
}
开发者ID:joshmoore,项目名称:ice,代码行数:13,代码来源:CommunicatorI.cpp
注:本文中的ice::AsyncResultPtr类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论