gz/transport/RepHandler.hh
Go to the documentation of this file.
Interface class used to manage a replier handler.
Definition: gz/transport/RepHandler.hh:51
std::string HandlerUuid() const
Get the unique UUID of this handler.
Definition: gz/transport/RepHandler.hh:79
virtual bool RunLocalCallback(const transport::ProtoMsg &_msgReq, transport::ProtoMsg &_msgRep)=0
Executes the local callback registered for this handler.
std::string hUuid
Unique handler's UUID.
Definition: gz/transport/RepHandler.hh:99
IRepHandler()
Constructor.
Definition: gz/transport/RepHandler.hh:53
virtual bool RunCallback(const std::string &_req, std::string &_rep)=0
Executes the callback registered for this handler.
virtual std::string RepTypeName() const =0
Get the message type name used in the service response.
virtual std::string ReqTypeName() const =0
Get the message type name used in the service request.
bool RunLocalCallback(const transport::ProtoMsg &_msgReq, transport::ProtoMsg &_msgRep)
Executes the local callback registered for this handler.
Definition: gz/transport/RepHandler.hh:130
void SetCallback(const std::function< bool(const Req &, Rep &)> &_cb)
Set the callback for this handler.
Definition: gz/transport/RepHandler.hh:123
RepHandler()=default
virtual std::string RepTypeName() const
Get the message type name used in the service response.
Definition: gz/transport/RepHandler.hh:242
bool RunCallback(const std::string &_req, std::string &_rep)
Executes the callback registered for this handler.
Definition: gz/transport/RepHandler.hh:203
virtual std::string ReqTypeName() const
Get the message type name used in the service request.
Definition: gz/transport/RepHandler.hh:236
A portable class for representing a Universally Unique Identifier.
Definition: gz/transport/Uuid.hh:44
T endl(T... args)
Definition: gz/transport/AdvertiseOptions.hh:29
google::protobuf::Message ProtoMsg
Definition: gz/transport/TransportTypes.hh:68