MCPcopy Create free account
hub / github.com/cpputest/cpputest / registerObserver

Method registerObserver

examples/ApplicationLib/EventDispatcher.cpp:35–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35void EventDispatcher::registerObserver(EventType type, EventObserver* observer)
36{
37 for (list<pair<EventType, EventObserver*> >::iterator i = observerList_.begin(); i != observerList_.end(); i++)
38 i->second->notifyRegistration(observer);
39
40 observerList_.push_back(make_pair(type, observer));
41}
42
43void EventDispatcher::dispatchEvent(const Event& event, int timeoutSeconds)
44{

Callers 1

TESTFunction · 0.80

Calls 2

beginMethod · 0.80
notifyRegistrationMethod · 0.80

Tested by 1

TESTFunction · 0.64