    

 ## 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_r2_2/classsimulation__framework_1_1core_1_1ITopic__inherit__graph.png)

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

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

[virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) TopicId [GetId](classsimulation__framework_1_1core_1_1ITopic.xhtml#ad4e077cd059e9c6f0ce9ad0df73ca3cd) () [const](classsimulation__framework_1_1core_1_1Topic.xhtml) =0 [virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) TopicType [GetType](classsimulation__framework_1_1core_1_1ITopic.xhtml#a461f8684a1e5190affbe69253f74fdb7) () [const](classsimulation__framework_1_1core_1_1Topic.xhtml) =0 [virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) std::size\_t [SubscriberCount](classsimulation__framework_1_1core_1_1ITopic.xhtml#a370ff9b0059ea1c200e6a5384671aac8) () [const](classsimulation__framework_1_1core_1_1Topic.xhtml) =0 [virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) std::size\_t [PublisherCount](classsimulation__framework_1_1core_1_1ITopic.xhtml#a469c0e1f5fd07f9829e93fd8a43bd6f7) () [const](classsimulation__framework_1_1core_1_1Topic.xhtml) =0 [virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) [void](classsimulation__framework_1_1core_1_1Topic.xhtml) [AddPublisher](classsimulation__framework_1_1core_1_1ITopic.xhtml#aadab7c49ae9beaa036d3fa9845aed85d) (std::unique\_ptr&lt; IPublisher &gt; [pub\_ptr](classsimulation__framework_1_1core_1_1Topic.xhtml))=0 [virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) [void](classsimulation__framework_1_1core_1_1Topic.xhtml) [AddSubscriber](classsimulation__framework_1_1core_1_1ITopic.xhtml#a612d64a1aca7a60a8efc7f07f4d28311) (std::unique\_ptr&lt; ISubscriber &gt; [sub\_ptr](classsimulation__framework_1_1core_1_1Topic.xhtml))=0 [virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) [void](classsimulation__framework_1_1core_1_1Topic.xhtml) [ClearPubSub](classsimulation__framework_1_1core_1_1ITopic.xhtml#a470392793ee8cb2fc406b8b1e1b55d2d) ()=0 [virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) [const](classsimulation__framework_1_1core_1_1Topic.xhtml) Subscribers &amp; [GetSubscribers](classsimulation__framework_1_1core_1_1ITopic.xhtml#a52c9a4a95089eb1dfbc0606974d9a8d0) () [const](classsimulation__framework_1_1core_1_1Topic.xhtml) =0 [virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) [const](classsimulation__framework_1_1core_1_1Topic.xhtml) Publishers &amp; [GetPublishers](classsimulation__framework_1_1core_1_1ITopic.xhtml#aa02ef4f55132426e2af9de01bde3bf4b) () [const](classsimulation__framework_1_1core_1_1Topic.xhtml) =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.

Definition at line [36](i__topic_8h_source.xhtml#l00036) of file [i\_topic.h](i__topic_8h_source.xhtml).



## Member Function Documentation

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

 [virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) [void](classsimulation__framework_1_1core_1_1Topic.xhtml) 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" name="a612d64a1aca7a60a8efc7f07f4d28311"></a>## [◆ ](#a612d64a1aca7a60a8efc7f07f4d28311)AddSubscriber()

 [virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) [void](classsimulation__framework_1_1core_1_1Topic.xhtml) 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" name="a470392793ee8cb2fc406b8b1e1b55d2d"></a>## [◆ ](#a470392793ee8cb2fc406b8b1e1b55d2d)ClearPubSub()

 [virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) [void](classsimulation__framework_1_1core_1_1Topic.xhtml) 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" name="ad4e077cd059e9c6f0ce9ad0df73ca3cd"></a>## [◆ ](#ad4e077cd059e9c6f0ce9ad0df73ca3cd)GetId()

 [virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) 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="aa02ef4f55132426e2af9de01bde3bf4b" name="aa02ef4f55132426e2af9de01bde3bf4b"></a>## [◆ ](#aa02ef4f55132426e2af9de01bde3bf4b)GetPublishers()

 [virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) [const](classsimulation__framework_1_1core_1_1Topic.xhtml) 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#ac31691f84f68ad4a3aeda6074739676f).





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

 [virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) [const](classsimulation__framework_1_1core_1_1Topic.xhtml) 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#ab0a3ea471d469cf2b0611b6548752298).





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

 [virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) 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" name="a469c0e1f5fd07f9829e93fd8a43bd6f7"></a>## [◆ ](#a469c0e1f5fd07f9829e93fd8a43bd6f7)PublisherCount()

 [virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) 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" name="a370ff9b0059ea1c200e6a5384671aac8"></a>## [◆ ](#a370ff9b0059ea1c200e6a5384671aac8)SubscriberCount()

 [virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) 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)