本文整理汇总了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);
}
}
示例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);
}
}