本文整理汇总了C++中NetIO::event方法的典型用法代码示例。如果您正苦于以下问题:C++ NetIO::event方法的具体用法?C++ NetIO::event怎么用?C++ NetIO::event使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NetIO
的用法示例。
在下文中一共展示了NetIO::event方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: reset
//------------------------------------------------------------------------------
// reset() -- Reset the station
//------------------------------------------------------------------------------
void Station::reset()
{
if (isMessageEnabled(MSG_INFO)) {
std::cout << "Station::reset()" << std::endl;
}
// Reset our major subsystems
if (sim != 0) sim->event(RESET_EVENT);
// ---
// Reset the ownship pointer
// ---
if (ownshipName != 0) {
setOwnshipByName( *ownshipName );
if (ownship == 0) {
// Ok, we had a list of players and an ownship player name, but still
// don't have an ownship pointer -- print an error message.
std::cerr << "Station::reset(): ownship not found: " << *ownshipName << std::endl;
}
}
// Reset the I/O Handlers
if (ioHandlers != 0) {
Basic::List::Item* item = ioHandlers ->getFirstItem();
while (item != 0) {
Basic::Pair* pair = (Basic::Pair*)(item->getValue());
Basic::IoHandler* p = (Basic::IoHandler*)( pair->object() );
p->event(RESET_EVENT);
item = item->getNext();
}
}
// Reset the OTW subsystems
if (otw != 0) {
Basic::List::Item* item = otw ->getFirstItem();
while (item != 0) {
Basic::Pair* pair = (Basic::Pair*)(item->getValue());
Otw* p = (Otw*)( pair->object() );
p->event(RESET_EVENT);
item = item->getNext();
}
}
// Reset the networks
if (networks != 0) {
Basic::List::Item* item = networks ->getFirstItem();
while (item != 0) {
Basic::Pair* pair = (Basic::Pair*)(item->getValue());
NetIO* p = (NetIO*)( pair->object() );
p->event(RESET_EVENT);
item = item->getNext();
}
}
BaseClass::reset();
}