Go to the documentation of this file.
12 #ifndef RTCTK_COMPONENTFRAMEWORK_EVENTSERVICEIF_HPP
13 #define RTCTK_COMPONENTFRAMEWORK_EVENTSERVICEIF_HPP
20 class EventPublisherIf;
21 class EventSubscriberIf;
35 virtual std::unique_ptr<EventPublisherIf>
MakePublisher(std::string
const& topic) = 0;
42 virtual std::unique_ptr<EventSubscriberIf>
MakeSubscriber(std::string
const& topic) = 0;
87 #endif // RTCTK_COMPONENTFRAMEWORK_EVENTSERVICEIF_HPP
virtual ~EventServiceIf()=default
Definition: commandReplier.cpp:20
virtual ~EventPublisherIf()=default
Interface class for publishing JSON events.
Definition: eventServiceIf.hpp:48
Interface class for subscribing to JSON events.
Definition: eventServiceIf.hpp:63
Defines the JSON payload type JsonPayload.
Interface class for providing pub/sub facilities for JSON events.
Definition: eventServiceIf.hpp:26
virtual ~EventSubscriberIf()=default
virtual std::unique_ptr< EventSubscriberIf > MakeSubscriber(std::string const &topic)=0
Creates a new subscriber for a specified topic.
virtual std::unique_ptr< EventPublisherIf > MakePublisher(std::string const &topic)=0
Creates a new publisher for a specified topic.
virtual void Subscribe(std::function< void(JsonPayload const &)> cb)=0
Subscribes to a specified topic.
virtual void Publish(JsonPayload const &sample)=0
Publishes a JSON object.
virtual void Unsubscribe()=0
Unsubscribes from a specified topic.
nlohmann::json JsonPayload
Type requirements:
Definition: jsonPayload.hpp:24