MCPcopy Create free account
hub / github.com/SoarGroup/Soar / ReceivedSystemEvent

Method ReceivedSystemEvent

Core/ClientSML/src/sml_ClientKernel.cpp:513–535  ·  view source on GitHub ↗

* @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) *************************************************************/

Source from the content-addressed store, hash-verified

511* @param pResponse The reply (no real need to fill anything in here currently)
512*************************************************************/
513void 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

Callers

nothing calls this directly

Calls 3

endMethod · 0.80
getListMethod · 0.45
getUserDataMethod · 0.45

Tested by

no test coverage detected