    

 ## On this page

  

 

 # simulation\_framework::core::ITopic Class Reference

 Last update: 16.07.2025 

`#include <<a class="el" href="i__topic_8h_source.xhtml">i_topic.h</a>>`

Inheritance diagram for simulation_framework::core::ITopic:

![Inheritance graph](/sites/default/files/migrate-content/avxcelerate_simulation_framework_2025_r1_num1/classsimulation__framework_1_1core_1_1ITopic__inherit__graph.png)

\[[legend](graph_legend.xhtml)\]

## <a name="pub-methods"></a>Public Member Functions

virtual TopicId [GetId](classsimulation__framework_1_1core_1_1ITopic.xhtml#ad4e077cd059e9c6f0ce9ad0df73ca3cd) () const =0 virtual TopicType [GetType](classsimulation__framework_1_1core_1_1ITopic.xhtml#a461f8684a1e5190affbe69253f74fdb7) () const =0 virtual std::size\_t [SubscriberCount](classsimulation__framework_1_1core_1_1ITopic.xhtml#a370ff9b0059ea1c200e6a5384671aac8) () const =0 virtual std::size\_t [PublisherCount](classsimulation__framework_1_1core_1_1ITopic.xhtml#a469c0e1f5fd07f9829e93fd8a43bd6f7) () const =0 virtual void [AddPublisher](classsimulation__framework_1_1core_1_1ITopic.xhtml#aadab7c49ae9beaa036d3fa9845aed85d) (std::unique\_ptr&lt; IPublisher &gt; pub\_ptr)=0 virtual void [AddSubscriber](classsimulation__framework_1_1core_1_1ITopic.xhtml#a612d64a1aca7a60a8efc7f07f4d28311) (std::unique\_ptr&lt; ISubscriber &gt; sub\_ptr)=0 virtual void [ClearPubSub](classsimulation__framework_1_1core_1_1ITopic.xhtml#a470392793ee8cb2fc406b8b1e1b55d2d) ()=0 virtual const Subscribers &amp; [GetSubscribers](classsimulation__framework_1_1core_1_1ITopic.xhtml#a7630cb9d29b99d7bf23c31cf55501fab) () const =0 virtual const Publishers &amp; [GetPublishers](classsimulation__framework_1_1core_1_1ITopic.xhtml#a30c943aeecff120162c4a65082bcb4e6) () const =0 <a id="details" name="details"></a>## Detailed Description

This is abstraction class of a [Topic](classsimulation__framework_1_1core_1_1Topic.xhtml "This is the concrete Topic class that can be used for creation of a communication channel with given ...") and it defines the interfaces based on different type of topic.



## Member Function Documentation

<a id="aadab7c49ae9beaa036d3fa9845aed85d"></a>## [◆ ](#aadab7c49ae9beaa036d3fa9845aed85d)AddPublisher()

 virtual void simulation\_framework::core::ITopic::AddPublisher  ( std::unique\_ptr&lt; IPublisher &gt;  *pub\_ptr*)   pure virtual 

Add one publisher of this [Topic](classsimulation__framework_1_1core_1_1Topic.xhtml "This is the concrete Topic class that can be used for creation of a communication channel with given ..."). 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&lt; TopicMsgType &gt;](classsimulation__framework_1_1core_1_1Topic.xhtml#a9a3bdb1cc0fb2b885fbe528903abcb14).





<a id="a612d64a1aca7a60a8efc7f07f4d28311"></a>## [◆ ](#a612d64a1aca7a60a8efc7f07f4d28311)AddSubscriber()

 virtual void simulation\_framework::core::ITopic::AddSubscriber  ( std::unique\_ptr&lt; ISubscriber &gt;  *sub\_ptr*)   pure virtual 

Add one subscriber to this [Topic](classsimulation__framework_1_1core_1_1Topic.xhtml "This is the concrete Topic class that can be used for creation of a communication channel with given ...")

Parameters sub\_ptrThe abstraction of subscriber interface Implemented in [simulation\_framework::core::Topic&lt; TopicMsgType &gt;](classsimulation__framework_1_1core_1_1Topic.xhtml#a33882d851ffa66f8db5a83813969e48a).





<a id="a470392793ee8cb2fc406b8b1e1b55d2d"></a>## [◆ ](#a470392793ee8cb2fc406b8b1e1b55d2d)ClearPubSub()

 virtual void simulation\_framework::core::ITopic::ClearPubSub  ( )   pure virtual 

Remove all publisher and subscriber which are asociated with this [Topic](classsimulation__framework_1_1core_1_1Topic.xhtml "This is the concrete Topic class that can be used for creation of a communication channel with given ...")

Implemented in [simulation\_framework::core::Topic&lt; TopicMsgType &gt;](classsimulation__framework_1_1core_1_1Topic.xhtml#ac366c5dd53e4c5770b1a5f40ae2c8956).





<a id="ad4e077cd059e9c6f0ce9ad0df73ca3cd"></a>## [◆ ](#ad4e077cd059e9c6f0ce9ad0df73ca3cd)GetId()

 virtual TopicId simulation\_framework::core::ITopic::GetId  ( )  const  pure virtual 

ReturnsA unique ID of this topic Implemented in [simulation\_framework::core::Topic&lt; TopicMsgType &gt;](classsimulation__framework_1_1core_1_1Topic.xhtml#a6cef83adabcaab8aabd20cd3184dca3c).





<a id="a30c943aeecff120162c4a65082bcb4e6"></a>## [◆ ](#a30c943aeecff120162c4a65082bcb4e6)GetPublishers()

 virtual const Publishers&amp; simulation\_framework::core::ITopic::GetPublishers  ( )  const  pure virtual 

ReturnsThe list of assigned publisher which are publishing message to this [Topic](classsimulation__framework_1_1core_1_1Topic.xhtml "This is the concrete Topic class that can be used for creation of a communication channel with given ...")Implemented in [simulation\_framework::core::Topic&lt; TopicMsgType &gt;](classsimulation__framework_1_1core_1_1Topic.xhtml#add9a23a5901f71c1161b94c5a19b3ccf).





<a id="a7630cb9d29b99d7bf23c31cf55501fab"></a>## [◆ ](#a7630cb9d29b99d7bf23c31cf55501fab)GetSubscribers()

 virtual const Subscribers&amp; simulation\_framework::core::ITopic::GetSubscribers  ( )  const  pure virtual 

ReturnsThe list of assigned subscriber which are listening to this [Topic](classsimulation__framework_1_1core_1_1Topic.xhtml "This is the concrete Topic class that can be used for creation of a communication channel with given ...")Implemented in [simulation\_framework::core::Topic&lt; TopicMsgType &gt;](classsimulation__framework_1_1core_1_1Topic.xhtml#a866d022f0c5454919d3c2b58c63eff72).





<a id="a461f8684a1e5190affbe69253f74fdb7"></a>## [◆ ](#a461f8684a1e5190affbe69253f74fdb7)GetType()

 virtual TopicType simulation\_framework::core::ITopic::GetType  ( )  const  pure virtual 

ReturnsThe type of this topic Implemented in [simulation\_framework::core::Topic&lt; TopicMsgType &gt;](classsimulation__framework_1_1core_1_1Topic.xhtml#a6f459336816bf96dd43d4a827043485d).





<a id="a469c0e1f5fd07f9829e93fd8a43bd6f7"></a>## [◆ ](#a469c0e1f5fd07f9829e93fd8a43bd6f7)PublisherCount()

 virtual std::size\_t simulation\_framework::core::ITopic::PublisherCount  ( )  const  pure virtual 

ReturnsThe number of publisher which publishes message into this [Topic](classsimulation__framework_1_1core_1_1Topic.xhtml "This is the concrete Topic class that can be used for creation of a communication channel with given ..."). The max publisher count of a topic is limited to be one. Implemented in [simulation\_framework::core::Topic&lt; TopicMsgType &gt;](classsimulation__framework_1_1core_1_1Topic.xhtml#a9056b30c90efc165ee8559b41e8a9064).





<a id="a370ff9b0059ea1c200e6a5384671aac8"></a>## [◆ ](#a370ff9b0059ea1c200e6a5384671aac8)SubscriberCount()

 virtual std::size\_t simulation\_framework::core::ITopic::SubscriberCount  ( )  const  pure virtual 

ReturnsThe number of subscriber which is listening to this topic Implemented in [simulation\_framework::core::Topic&lt; TopicMsgType &gt;](classsimulation__framework_1_1core_1_1Topic.xhtml#a71ce3df423a48cbc555cf9fb322726df).





---

The documentation for this class was generated from the following file:- [i\_topic.h](i__topic_8h_source.xhtml)