当前位置: 首页>>代码示例>>C++>>正文


C++ ice::AsyncResultPtr类代码示例

本文整理汇总了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);
        }
    }
开发者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


注:本文中的ice::AsyncResultPtr类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。