MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / attach

Method attach

radiantcore/entity/KeyValue.cpp:33–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33void KeyValue::attach(KeyObserver& observer)
34{
35 // Store the observer
36 _observers.push_back(&observer);
37
38 // Notify the newly inserted observer with the existing value
39 observer.onKeyValueChanged(get());
40}
41
42void KeyValue::detach(KeyObserver& observer, bool sendEmptyValue)
43{

Callers 4

NameKeyObserverMethod · 0.45
attachObserverMethod · 0.45
onKeyInsertMethod · 0.45
KeyValueObserverMethod · 0.45

Calls 3

getFunction · 0.85
push_backMethod · 0.45
onKeyValueChangedMethod · 0.45

Tested by

no test coverage detected