gz/transport/HandlerStorage.hh
Go to the documentation of this file.
Class to store and manage service call handlers.
Definition: gz/transport/HandlerStorage.hh:38
bool HasHandlersForTopic(const std::string &_topic) const
Return true if we have stored at least one request for the topic.
Definition: gz/transport/HandlerStorage.hh:186
bool FirstHandler(const std::string &_topic, const std::string &_msgTypeName, std::shared_ptr< T > &_handler) const
Get the first handler for a topic that matches a specific message type.
Definition: gz/transport/HandlerStorage.hh:112
bool HasHandlersForNode(const std::string &_topic, const std::string &_nUuid) const
Check if a node has at least one handler.
Definition: gz/transport/HandlerStorage.hh:198
void AddHandler(const std::string &_topic, const std::string &_nUuid, const std::shared_ptr< T > &_handler)
Add a request handler to a topic. A request handler stores the callback and types associated to a ser...
Definition: gz/transport/HandlerStorage.hh:165
bool RemoveHandler(const std::string &_topic, const std::string &_nUuid, const std::string &_reqUuid)
Remove a request handler. The node's uuid is used as a key to remove the appropriate request handler.
Definition: gz/transport/HandlerStorage.hh:214
bool FirstHandler(const std::string &_topic, const std::string &_reqTypeName, const std::string &_repTypeName, std::shared_ptr< T > &_handler) const
Get the first handler for a topic that matches a specific pair of request/response types.
Definition: gz/transport/HandlerStorage.hh:82
bool RemoveHandlersForNode(const std::string &_topic, const std::string &_nUuid)
Remove all the handlers from a given node.
Definition: gz/transport/HandlerStorage.hh:238
bool Handler(const std::string &_topic, const std::string &_nUuid, const std::string &_hUuid, std::shared_ptr< T > &_handler) const
Get a specific handler.
Definition: gz/transport/HandlerStorage.hh:141
bool Handlers(const std::string &_topic, std::map< std::string, std::map< std::string, std::shared_ptr< T > >> &_handlers) const
Get the data handlers for a topic. A request handler stores the callback and types associated to a se...
Definition: gz/transport/HandlerStorage.hh:64
T make_pair(T... args)
Definition: gz/transport/AdvertiseOptions.hh:29
const std::string kGenericMessageType
The string type used for generic messages.
Definition: gz/transport/TransportTypes.hh:172