18 #ifndef GZ_TRANSPORT_HANDLERSTORAGE_HH_
19 #define GZ_TRANSPORT_HANDLERSTORAGE_HH_
26 #include "gz/transport/config.hh"
34 inline namespace GZ_TRANSPORT_VERSION_NAMESPACE {
70 if (this->data.find(_topic) == this->data.end())
73 _handlers = this->data.at(_topic);
89 if (this->data.find(_topic) == this->data.end())
92 const auto &m = this->data.at(_topic);
93 for (
const auto &node : m)
95 for (
const auto &handler : node.second)
97 if (_reqTypeName == handler.second->ReqTypeName() &&
98 _repTypeName == handler.second->RepTypeName())
100 _handler = handler.second;
118 if (this->data.find(_topic) == this->data.end())
121 const auto &m = this->data.at(_topic);
122 for (
const auto &node : m)
124 for (
const auto &handler : node.second)
126 if (_msgTypeName == handler.second->TypeName() ||
129 _handler = handler.second;
148 if (this->data.find(_topic) == this->data.end())
151 auto const &m = this->data.at(_topic);
152 if (m.find(_nUuid) == m.end())
155 if (m.at(_nUuid).find(_hUuid) == m.at(_nUuid).end())
158 _handler = m.at(_nUuid).at(_hUuid);
179 if (this->data.find(_topic) == this->data.end())
183 if (this->data[_topic].find(_nUuid) == this->data[_topic].end())
187 this->data[_topic][_nUuid].insert(
197 if (this->data.find(_topic) == this->data.end())
200 return !this->data.at(_topic).empty();
210 if (this->data.find(_topic) == this->data.end())
213 return this->data.at(_topic).find(_nUuid) !=
214 this->data.at(_topic).end();
228 if (this->data.find(_topic) != this->data.end())
230 if (this->data[_topic].find(_nUuid) != this->data[_topic].end())
232 counter = this->data[_topic][_nUuid].erase(_reqUuid);
233 if (this->data[_topic][_nUuid].empty())
234 this->data[_topic].erase(_nUuid);
235 if (this->data[_topic].empty())
236 this->data.erase(_topic);
251 if (this->data.find(_topic) != this->data.end())
253 counter = this->data[_topic].erase(_nUuid);
254 if (this->data[_topic].empty())
255 this->data.erase(_topic);
264 private: TopicServiceCalls_M data;