HandlerStorage.hh
Go to the documentation of this file.
T at(T... args)
Class to store and manage service call handlers.
Definition HandlerStorage.hh:34
bool HasHandlersForTopic(const std::string &_topic) const
Return true if we have stored at least one request for the topic.
Definition HandlerStorage.hh:182
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:108
bool HasHandlersForNode(const std::string &_topic, const std::string &_nUuid) const
Check if a node has at least one handler.
Definition HandlerStorage.hh:194
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:161
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:210
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:78
bool RemoveHandlersForNode(const std::string &_topic, const std::string &_nUuid)
Remove all the handlers from a given node.
Definition HandlerStorage.hh:234
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:137
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:60
T empty(T... args)
T end(T... args)
T erase(T... args)
T find(T... args)
T insert(T... args)
T make_pair(T... args)
*brief Advertise a new service without any output parameter *In this version the callback is a free function *param[in] _topic Topic name associated to the service *param[in] _cb Callback to handle the service request with the *following void const AdvertiseServiceOptions ReplyT const std::string & _topic
Definition Node.hh:558
const std::string kGenericMessageType
The string type used for generic messages.
Definition TransportTypes.hh:170
Definition AdvertiseOptions.hh:28