Class simulation_framework::core::ITopic
Last update: 22.04.2026
Definition: core/communication/i_topic.h (line 38)
This is abstraction class of a Topic and it defines the interfaces based on different type of topic.
Inherited by:
Members
- AddPublisher
- AddSubscriber
- ClearPubSub
- GetId
- GetPublishers
- GetSubscribers
- GetType
- PublisherCount
- SubscriberCount
- ~ITopic
Public functions
Function ~ITopic
virtual simulation_framework::core::ITopic::~ITopic()=default
Return type:
Function GetId
virtual TopicId simulation_framework::core::ITopic::GetId() const =0
Returns:
A unique ID of this topic
Return type: TopicId
Reimplemented by:
Function GetType
virtual TopicType simulation_framework::core::ITopic::GetType() const =0
Returns:
The type of this topic
Return type: TopicType
Reimplemented by:
Function SubscriberCount
virtual std::size_t simulation_framework::core::ITopic::SubscriberCount() const =0
Returns:
The number of subscriber which is listening to this topic
Return type: std::size_t
Reimplemented by:
Function PublisherCount
virtual std::size_t simulation_framework::core::ITopic::PublisherCount() const =0
Returns:
The number of publisher which publishes message into this Topic. The max publisher count of a topic is limited to be one.
Return type: std::size_t
Reimplemented by:
Function AddPublisher
virtual void simulation_framework::core::ITopic::AddPublisher(std::unique_ptr< IPublisher > pub_ptr)=0
Add one publisher of this Topic. The max publisher count of a topic is limited to be one.
Parameters:
- pub_ptr: The abstraction of publisher interface
Parameters:
- std::unique_ptr< IPublisher > pub_ptr
Return type: void
Reimplemented by:
Function AddSubscriber
virtual void simulation_framework::core::ITopic::AddSubscriber(std::unique_ptr< ISubscriber > sub_ptr)=0
Add one subscriber to this Topic
Parameters:
- sub_ptr: The abstraction of subscriber interface
Parameters:
- std::unique_ptr< ISubscriber > sub_ptr
Return type: void
Reimplemented by:
Function ClearPubSub
virtual void simulation_framework::core::ITopic::ClearPubSub()=0
Remove all publisher and subscriber which are asociated with this Topic
Return type: void
Reimplemented by:
Function GetSubscribers
virtual const Subscribers & simulation_framework::core::ITopic::GetSubscribers() const =0
Returns:
The list of assigned subscriber which are listening to this Topic
Return type: const Subscribers &
Reimplemented by:
Function GetPublishers
virtual const Publishers & simulation_framework::core::ITopic::GetPublishers() const =0
Returns:
The list of assigned publisher which are publishing message to this Topic
Return type: const Publishers &
Reimplemented by: