* @brief This function is called when an event is received * from the Soar kernel. * * @param pIncoming The event command * @param pResponse The reply (no real need to fill anything in here currently) *************************************************************/
| 511 | * @param pResponse The reply (no real need to fill anything in here currently) |
| 512 | *************************************************************/ |
| 513 | void Kernel::ReceivedSystemEvent(smlSystemEventId id, AnalyzeXML* /*pIncoming*/, ElementXML* /*pResponse*/) |
| 514 | { |
| 515 | // Look up the handler(s) from the map |
| 516 | SystemEventMap::ValueList* pHandlers = m_SystemEventMap.getList(id) ; |
| 517 | |
| 518 | if (!pHandlers) |
| 519 | { |
| 520 | return ; |
| 521 | } |
| 522 | |
| 523 | // Go through the list of event handlers calling each in turn |
| 524 | for (SystemEventMap::ValueListIter iter = pHandlers->begin() ; iter != pHandlers->end() ;) |
| 525 | { |
| 526 | SystemEventHandlerPlusData handlerWithData = *iter ; |
| 527 | iter++ ; |
| 528 | |
| 529 | SystemEventHandler handler = handlerWithData.m_Handler ; |
| 530 | void* pUserData = handlerWithData.getUserData() ; |
| 531 | |
| 532 | // Call the handler |
| 533 | handler(id, pUserData, this) ; |
| 534 | } |
| 535 | } |
| 536 | |
| 537 | /************************************************************* |
| 538 | * @brief This function is called when an event is received |
nothing calls this directly
no test coverage detected