| 35 | namespace common { |
| 36 | |
| 37 | void PathTreeObserver::notifyEvent( |
| 38 | PathTreeEvents e, PathTreeObserver::callback_argument arg) const { |
| 39 | auto it = m_handlers.find(e); |
| 40 | if (end(m_handlers) != it) { |
| 41 | auto &callback = (*it).second; |
| 42 | if (callback) { |
| 43 | callback(arg); |
| 44 | } |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | void PathTreeObserver::setEventCallback( |
| 49 | PathTreeEvents e, PathTreeObserver::callback_type const &callback) { |