本文整理汇总了C++中Strategy::handleMessage方法的典型用法代码示例。如果您正苦于以下问题:C++ Strategy::handleMessage方法的具体用法?C++ Strategy::handleMessage怎么用?C++ Strategy::handleMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Strategy
的用法示例。
在下文中一共展示了Strategy::handleMessage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CmiAbort
/// Method invoked upon receipt a message routed through comlib.
void *strategyHandler(void *msg) {
CmiMsgHeaderExt *conv_header = (CmiMsgHeaderExt *) msg;
int instid = conv_header->stratid;
#ifndef CMK_OPTIMIZE
// check that the instid is not zero, meaning a possibly uninitialized value
if (instid == 0) {
CmiAbort("Comlib strategy ID is zero, did you forget to initialize a variable?\n");
}
#endif
// when handling a message always call the lowest level
Strategy *strat = ConvComlibGetStrategy(instid);
strat->handleMessage(msg);
return NULL;
}