本文整理汇总了C++中CEventClient::getSizes方法的典型用法代码示例。如果您正苦于以下问题:C++ CEventClient::getSizes方法的具体用法?C++ CEventClient::getSizes怎么用?C++ CEventClient::getSizes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEventClient
的用法示例。
在下文中一共展示了CEventClient::getSizes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sendEvent
/*!
In case of attached mode, the current context must be reset to context for client
\param [in] event Event sent to server
*/
void CContextClient::sendEvent(CEventClient& event)
{
list<int> ranks = event.getRanks();
if (!event.isEmpty())
{
list<int> sizes = event.getSizes();
// We force the getBuffers call to be non-blocking on the servers
list<CBufferOut*> buffList;
bool couldBuffer = getBuffers(ranks, sizes, buffList, !CXios::isClient);
if (couldBuffer)
{
event.send(timeLine, sizes, buffList);
checkBuffers(ranks);
if (isAttachedModeEnabled()) // couldBuffer is always true in attached mode
{
waitEvent(ranks);
CContext::setCurrent(context->getId());
}
}
else
{
tmpBufferedEvent.ranks = ranks;
tmpBufferedEvent.sizes = sizes;
for (list<int>::const_iterator it = sizes.begin(); it != sizes.end(); it++)
tmpBufferedEvent.buffers.push_back(new CBufferOut(*it));
event.send(timeLine, tmpBufferedEvent.sizes, tmpBufferedEvent.buffers);
}
}
timeLine++;
}