MCPcopy Create free account
hub / github.com/ChunelFeng/CGraph / trigger

Method trigger

src/GraphCtrl/GraphEvent/GEventManager.cpp:45–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43
44
45CStatus 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
58std::shared_future<CVoid> GEventManager::asyncTrigger(const std::string &key, GEventAsyncStrategy strategy) {

Callers 3

notifyFunction · 0.45
switchFunction · 0.45
asyncProcessMethod · 0.45

Calls 3

CGRAPH_ASSERT_NOT_NULLFunction · 0.85
findMethod · 0.45
processMethod · 0.45

Tested by

no test coverage detected