simulation_framework::core::ITopic Class Reference
Last update: 16.07.2025#include <i_topic.h>

Public Member Functions | |
| virtual TopicId | GetId () const =0 |
| virtual TopicType | GetType () const =0 |
| virtual std::size_t | SubscriberCount () const =0 |
| virtual std::size_t | PublisherCount () const =0 |
| virtual void | AddPublisher (std::unique_ptr< IPublisher > pub_ptr)=0 |
| virtual void | AddSubscriber (std::unique_ptr< ISubscriber > sub_ptr)=0 |
| virtual void | ClearPubSub ()=0 |
| virtual const Subscribers & | GetSubscribers () const =0 |
| virtual const Publishers & | GetPublishers () const =0 |
Detailed Description
This is abstraction class of a Topic and it defines the interfaces based on different type of topic.
Member Function Documentation
◆ AddPublisher()
|
pure virtual |
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
Implemented in simulation_framework::core::Topic< TopicMsgType >.
◆ AddSubscriber()
|
pure virtual |
Add one subscriber to this Topic
- Parameters
-
sub_ptr The abstraction of subscriber interface
Implemented in simulation_framework::core::Topic< TopicMsgType >.
◆ ClearPubSub()
|
pure virtual |
Remove all publisher and subscriber which are asociated with this Topic
Implemented in simulation_framework::core::Topic< TopicMsgType >.
◆ GetId()
|
pure virtual |
- Returns
- A unique ID of this topic
Implemented in simulation_framework::core::Topic< TopicMsgType >.
◆ GetPublishers()
|
pure virtual |
- Returns
- The list of assigned publisher which are publishing message to this Topic
Implemented in simulation_framework::core::Topic< TopicMsgType >.
◆ GetSubscribers()
|
pure virtual |
- Returns
- The list of assigned subscriber which are listening to this Topic
Implemented in simulation_framework::core::Topic< TopicMsgType >.
◆ GetType()
|
pure virtual |
- Returns
- The type of this topic
Implemented in simulation_framework::core::Topic< TopicMsgType >.
◆ PublisherCount()
|
pure virtual |
- Returns
- The number of publisher which publishes message into this Topic. The max publisher count of a topic is limited to be one.
Implemented in simulation_framework::core::Topic< TopicMsgType >.
◆ SubscriberCount()
|
pure virtual |
- Returns
- The number of subscriber which is listening to this topic
Implemented in simulation_framework::core::Topic< TopicMsgType >.
The documentation for this class was generated from the following file: