本文整理汇总了C++中ObjectPrx::ice_twoway方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjectPrx::ice_twoway方法的具体用法?C++ ObjectPrx::ice_twoway怎么用?C++ ObjectPrx::ice_twoway使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectPrx
的用法示例。
在下文中一共展示了ObjectPrx::ice_twoway方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void
Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amdCB,
const std::pair<const Byte*, const Byte*>& inParams, const Current& current)
{
//
// Set the correct facet on the proxy.
//
if(!current.facet.empty())
{
proxy = proxy->ice_facet(current.facet);
}
//
// Modify the proxy according to the request id. This can
// be overridden by the _fwd context.
//
if(current.requestId == 0)
{
if(_alwaysBatch && _requestQueue)
{
proxy = proxy->ice_batchOneway();
}
else
{
proxy = proxy->ice_oneway();
}
}
else if(current.requestId > 0)
{
proxy = proxy->ice_twoway();
}
//
// Modify the proxy according to the _fwd context field.
//
Context::const_iterator p = current.ctx.find("_fwd");
if(p != current.ctx.end())
{
for(unsigned int i = 0; i < p->second.length(); ++i)
{
char option = p->second[i];
switch(option)
{
case 't':
{
proxy = proxy->ice_twoway();
break;
}
case 'o':
{
if(_alwaysBatch && _requestQueue)
{
proxy = proxy->ice_batchOneway();
}
else
{
proxy = proxy->ice_oneway();
}
break;
}
case 'd':
{
if(_alwaysBatch && _requestQueue)
{
proxy = proxy->ice_batchDatagram();
}
else
{
proxy = proxy->ice_datagram();
}
break;
}
case 'O':
{
if(_requestQueue)
{
proxy = proxy->ice_batchOneway();
}
else
{
proxy = proxy->ice_oneway();
}
break;
}
case 'D':
{
if(_requestQueue)
{
proxy = proxy->ice_batchDatagram();
}
else
{
proxy = proxy->ice_datagram();
}
break;
}
//.........这里部分代码省略.........