本文整理汇总了C++中ice::AsyncResultPtr类的典型用法代码示例。如果您正苦于以下问题:C++ AsyncResultPtr类的具体用法?C++ AsyncResultPtr怎么用?C++ AsyncResultPtr使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AsyncResultPtr类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例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);
}
}
}
示例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);
};
}
示例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;
}
}
示例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);
}
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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();
}
}
示例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;
}