HandlerStorage.hh
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 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 HasHandlersForNode(const std::string &_topic, const std::string &_nUuid) const
Check if a node has at least one handler.
Definition: HandlerStorage.hh:194
Definition: AdvertiseOptions.hh:27
STL class.
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
T find(T... args)
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
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
T at(T... args)
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 RemoveHandlersForNode(const std::string &_topic, const std::string &_nUuid)
Remove all the handlers from a given node.
Definition: HandlerStorage.hh:234
T erase(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 const ReplyT std::string _topic)
Definition: Node.hh:558
STL class.
bool HasHandlersForTopic(const std::string &_topic) const
Return true if we have stored at least one request for the topic.
Definition: HandlerStorage.hh:182
T insert(T... args)
const std::string kGenericMessageType
The string type used for generic messages.
Definition: TransportTypes.hh:170
T empty(T... args)
T make_pair(T... args)
T end(T... args)
Class to store and manage service call handlers.
Definition: HandlerStorage.hh:33