| 31 | } |
| 32 | |
| 33 | void 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 | |
| 42 | void KeyValue::detach(KeyObserver& observer, bool sendEmptyValue) |
| 43 | { |
no test coverage detected