Skip to main content

AVxcelerate Simulation Framework 2024 R2 SP02

simulation_framework::core::ITopic Class Reference

Last update: 16.07.2025

#include <i_topic.h>

Inheritance diagram for simulation_framework::core::ITopic:

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()

virtual void simulation_framework::core::ITopic::AddPublisher ( std::unique_ptr< IPublisher >  pub_ptr)
pure virtual

Add one publisher of this Topic. The max publisher count of a topic is limited to be one.

Parameters
pub_ptrThe abstraction of publisher interface

Implemented in simulation_framework::core::Topic< TopicMsgType >.

◆ AddSubscriber()

virtual void simulation_framework::core::ITopic::AddSubscriber ( std::unique_ptr< ISubscriber >  sub_ptr)
pure virtual

Add one subscriber to this Topic

Parameters
sub_ptrThe abstraction of subscriber interface

Implemented in simulation_framework::core::Topic< TopicMsgType >.

◆ ClearPubSub()

virtual void simulation_framework::core::ITopic::ClearPubSub ( )
pure virtual

Remove all publisher and subscriber which are asociated with this Topic

Implemented in simulation_framework::core::Topic< TopicMsgType >.

◆ GetId()

virtual TopicId simulation_framework::core::ITopic::GetId ( ) const
pure virtual
Returns
A unique ID of this topic

Implemented in simulation_framework::core::Topic< TopicMsgType >.

◆ GetPublishers()

virtual const Publishers& simulation_framework::core::ITopic::GetPublishers ( ) const
pure virtual
Returns
The list of assigned publisher which are publishing message to this Topic

Implemented in simulation_framework::core::Topic< TopicMsgType >.

◆ GetSubscribers()

virtual const Subscribers& simulation_framework::core::ITopic::GetSubscribers ( ) const
pure virtual
Returns
The list of assigned subscriber which are listening to this Topic

Implemented in simulation_framework::core::Topic< TopicMsgType >.

◆ GetType()

virtual TopicType simulation_framework::core::ITopic::GetType ( ) const
pure virtual
Returns
The type of this topic

Implemented in simulation_framework::core::Topic< TopicMsgType >.

◆ PublisherCount()

virtual std::size_t simulation_framework::core::ITopic::PublisherCount ( ) const
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()

virtual std::size_t simulation_framework::core::ITopic::SubscriberCount ( ) const
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:

Connect with Ansys