| 43 | |
| 44 | |
| 45 | CStatus GEventManager::trigger(const std::string &key, GEventType type, GEventAsyncStrategy strategy) { |
| 46 | CGRAPH_FUNCTION_BEGIN |
| 47 | auto result = events_map_.find(key); |
| 48 | CGRAPH_RETURN_ERROR_STATUS_BY_CONDITION(events_map_.end() == result, |
| 49 | "event key [" + key + "] no find") |
| 50 | |
| 51 | auto event = result->second; |
| 52 | CGRAPH_ASSERT_NOT_NULL(event) |
| 53 | status = event->process(type, strategy); |
| 54 | CGRAPH_FUNCTION_END |
| 55 | } |
| 56 | |
| 57 | |
| 58 | std::shared_future<CVoid> GEventManager::asyncTrigger(const std::string &key, GEventAsyncStrategy strategy) { |
no test coverage detected