6 #include <unordered_map>
10 #include "GraphGenerators.hpp"
11 #include "GraphTypes.hpp"
20 typedef std::weak_ptr<Notifiable> NotifiableWeakPtr;
21 typedef std::vector<std::pair<NotifiableWeakPtr, size_t>> NodeEntries;
22 typedef std::unordered_map<NodeId, NodeEntries> Notifiables;
23 typedef std::pair<NodeId, size_t> Key;
28 void changed(
const NodeId& node);
30 Key subscribeToChanges(
const NodeId& nid, NotifiableWeakPtr gen);
31 void unsubscribeToChanges(
const Key& key);
35 std::mutex m_changeMutex;
36 Notifiables m_subscribers;
40 typedef std::shared_ptr<ChangeListener> ChangeListenerPtr;