HandlerStorage.hh
Go to the documentation of this file.
Class to store and manage service call handlers.
Definition: HandlerStorage.hh:40
bool HasHandlersForTopic(const std::string &_topic) const
Return true if we have stored at least one request for the topic.
Definition: HandlerStorage.hh:188
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: HandlerStorage.hh:114
bool HasHandlersForNode(const std::string &_topic, const std::string &_nUuid) const
Check if a node has at least one handler.
Definition: HandlerStorage.hh:200
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: HandlerStorage.hh:167
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: HandlerStorage.hh:216
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: HandlerStorage.hh:84
bool RemoveHandlersForNode(const std::string &_topic, const std::string &_nUuid)
Remove all the handlers from a given node.
Definition: HandlerStorage.hh:240
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: HandlerStorage.hh:143
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: HandlerStorage.hh:66
T make_pair(T... args)
const std::string kGenericMessageType
The string type used for generic messages.
Definition: TransportTypes.hh:174
Definition: AdvertiseOptions.hh:29