diff options
author | Roland Reichwein <mail@reichwein.it> | 2023-01-28 17:06:57 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2023-01-28 17:06:57 +0100 |
commit | 4247b81e7756ce1ff01e097e634a9dcbc0912787 (patch) | |
tree | af14dd7aedf6b06826b5c15e3994431ed86f84a7 /connectionregistry.h | |
parent | a61c702d91d7444ce0bb094ddccc70f72416500b (diff) |
Added tests
Diffstat (limited to 'connectionregistry.h')
-rw-r--r-- | connectionregistry.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/connectionregistry.h b/connectionregistry.h index cdd30d9..155ab31 100644 --- a/connectionregistry.h +++ b/connectionregistry.h @@ -22,16 +22,18 @@ public: void addConnection(connection c); void delConnection(connection c); - // map connection to id - std::unordered_map<connection, std::string> m_connections; - // map id to list of related connections, used for iteration over connections to notify about changes - std::unordered_map<std::string, std::unordered_set<connection>> m_ids; - std::unordered_set<connection>::iterator begin(const std::string& id); std::unordered_set<connection>::iterator end(const std::string& id); void dump() const; +private: + // map connection to id + std::unordered_map<connection, std::string> m_connections; + // map id to list of related connections, used for iteration over connections to notify about changes + std::unordered_map<std::string, std::unordered_set<connection>> m_ids; + +public: class RegistryGuard { public: |