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


C++ ObjectPrxPtr::__reference方法代码示例

本文整理汇总了C++中ice::ObjectPrxPtr::__reference方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjectPrxPtr::__reference方法的具体用法?C++ ObjectPrxPtr::__reference怎么用?C++ ObjectPrxPtr::__reference使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ice::ObjectPrxPtr的用法示例。


在下文中一共展示了ObjectPrxPtr::__reference方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OutgoingBase

ProxyOutgoingBase::ProxyOutgoingBase(const Ice::ObjectPrxPtr& proxy, OperationMode mode) :
    OutgoingBase(proxy->__reference()->getInstance().get()),
    _proxy(proxy),
    _mode(mode),
    _state(StateUnsent)
{
    int invocationTimeout = _proxy->__reference()->getInvocationTimeout();
    if(invocationTimeout > 0)
    {
        _invocationTimeoutDeadline = Time::now(Time::Monotonic) + Time::milliSeconds(invocationTimeout);
    }
}
开发者ID:hadoop835,项目名称:ice,代码行数:12,代码来源:Outgoing.cpp

示例2: ProxyOutgoingBase

Outgoing::Outgoing(const Ice::ObjectPrxPtr& proxy, const string& operation, OperationMode mode, const Context& context) :
    ProxyOutgoingBase(proxy, mode),
    _encoding(getCompatibleEncoding(proxy->__reference()->getEncoding())),
    _is(proxy->__reference()->getInstance().get(), Ice::currentProtocolEncoding),
    _operation(operation)
{
    checkSupportedProtocol(getCompatibleProtocol(proxy->__reference()->getProtocol()));
    _observer.attach(proxy, operation, context);
    switch(_proxy->__reference()->getMode())
    {
        case Reference::ModeTwoway:
        case Reference::ModeOneway:
        case Reference::ModeDatagram:
        {
            _os.writeBlob(requestHdr, sizeof(requestHdr));
            break;
        }

        case Reference::ModeBatchOneway:
        case Reference::ModeBatchDatagram:
        {
            _proxy->__getBatchRequestQueue()->prepareBatchRequest(&_os);
            break;
        }
    }

    try
    {
        _os.write(_proxy->__reference()->getIdentity());

        //
        // For compatibility with the old FacetPath.
        //
        if(_proxy->__reference()->getFacet().empty())
        {
            _os.write(static_cast<string*>(0), static_cast<string*>(0));
        }
        else
        {
            string facet = _proxy->__reference()->getFacet();
            _os.write(&facet, &facet + 1);
        }

        _os.write(operation, false);

        _os.write(static_cast<Ice::Byte>(mode));

        if(&context != &Ice::noExplicitContext)
        {
            //
            // Explicit context
            //
            _os.write(context);
        }
        else
        {
            //
            // Implicit context
            //
            const ImplicitContextIPtr& implicitContext = _proxy->__reference()->getInstance()->getImplicitContext();
            const Context& prxContext = _proxy->__reference()->getContext()->getValue();
            if(implicitContext == 0)
            {
                _os.write(prxContext);
            }
            else
            {
                implicitContext->write(prxContext, &_os);
            }
        }
    }
    catch(const LocalException& ex)
    {
        abort(ex);
    }
}
开发者ID:465060874,项目名称:ice,代码行数:76,代码来源:Outgoing.cpp


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