    

 ## On this page

  

 

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

 Last update: 16.07.2025 

This is the interface class for creating a standalone activity service. It defines how a customized activity needs to be instantiated through or not through StandaloneInitData. [More...](classsimulation__framework_1_1core_1_1IStandaloneActivityCreator.xhtml#details)

`#include <<a class="el" href="i__standalone__activity__creator_8h_source.xhtml">i_standalone_activity_creator.h</a>>`

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

[virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) std::string [GetName](classsimulation__framework_1_1core_1_1IStandaloneActivityCreator.xhtml#a61fa7488f9850ed80c0f102da8a966bd) ()=0 [virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) std::unique\_ptr&lt; [core::lifecycle::IActivity](classsimulation__framework_1_1core_1_1lifecycle_1_1IActivity.xhtml) &gt; [Create](classsimulation__framework_1_1core_1_1IStandaloneActivityCreator.xhtml#a4c1bc889e97510c6357b16f893c755b4) ([const](classsimulation__framework_1_1core_1_1Topic.xhtml) core::StandaloneInitData &amp;[standalone\_init\_data](classsimulation__framework_1_1core_1_1Topic.xhtml))=0 Create an std::unique\_ptr&lt;IActivity&gt; which will be scheduled remotely through scheduling event.   
 <a id="details" name="details"></a>## Detailed Description

This is the interface class for creating a standalone activity service. It defines how a customized activity needs to be instantiated through or not through StandaloneInitData.

You have already the example how you create an activity "MyActivity" in simfwk-core/lifecycle/activity/base\_activity.h

This example shows how to implement the [IStandaloneActivityCreator](classsimulation__framework_1_1core_1_1IStandaloneActivityCreator.xhtml "This is the interface class for creating a standalone activity service. It defines how a customized a...") interface based on "MyActivity"

 using [TopicToBePublished](classsimulation__framework_1_1core_1_1Topic.xhtml) = [Topic&lt;MsgToBePublished&gt;](classsimulation__framework_1_1core_1_1Topic.xhtml);

 using [TopicSubscribingOn](classsimulation__framework_1_1core_1_1Topic.xhtml) = [Topic&lt;MsgSubscribingOn&gt;](classsimulation__framework_1_1core_1_1Topic.xhtml);

 

 class [MyActivityCreator](classsimulation__framework_1_1core_1_1Topic.xhtml) : public [IStandaloneActivityCreator](classsimulation__framework_1_1core_1_1IStandaloneActivityCreator.xhtml)

 {

 public:

 [MyActivityCreator](classsimulation__framework_1_1core_1_1Topic.xhtml)(const std::string&amp; name) : [standalone\_activity\_name\_](classsimulation__framework_1_1core_1_1Topic.xhtml)(name) {}

 std::unique_ptr&lt;IActivity&gt; Create(const core::StandaloneInitData&amp; [standalone\_init\_data](classsimulation__framework_1_1core_1_1Topic.xhtml))

override

 {

 std::shared_ptr&lt;ITopic&gt; [topic\_going\_to\_publish](classsimulation__framework_1_1core_1_1Topic.xhtml) = std::make_shared&lt;TopicToBePublished&gt;("TopicToBePublished");

 std::shared_ptr&lt;ITopic&gt; [topic\_want\_to\_receive](classsimulation__framework_1_1core_1_1Topic.xhtml) = std::make_shared&lt;TopicSubscribingOn&gt;("TopicSubscribingOn");

 

 return std::make_unique&lt;MyActivity&gt;(

 [standalone\_activity\_name\_](classsimulation__framework_1_1core_1_1Topic.xhtml), Topics{[topic\_going\_to\_publish](classsimulation__framework_1_1core_1_1Topic.xhtml), [topic\_want\_to\_receive](classsimulation__framework_1_1core_1_1Topic.xhtml)}, MyLogic{});

 }

 std::string GetName() override { return standalone_activity_name_; }

 

 private:

 std::string standalone_activity_name_;

 };

[simulation\_framework::core::IStandaloneActivityCreator](classsimulation__framework_1_1core_1_1IStandaloneActivityCreator.xhtml)

This is the interface class for creating a standalone activity service. It defines how a customized a...

**Definition** [i\_standalone\_activity\_creator.h:55](i__standalone__activity__creator_8h_source.xhtml#l00054)



[simulation\_framework::core::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 ...

**Definition** [topic.h:38](topic_8h_source.xhtml#l00037)





Definition at line [54](i__standalone__activity__creator_8h_source.xhtml#l00054) of file [i\_standalone\_activity\_creator.h](i__standalone__activity__creator_8h_source.xhtml).



## Member Function Documentation

<a id="a4c1bc889e97510c6357b16f893c755b4" name="a4c1bc889e97510c6357b16f893c755b4"></a>## [◆ ](#a4c1bc889e97510c6357b16f893c755b4)Create()

 [virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) std::unique\_ptr&lt; [core::lifecycle::IActivity](classsimulation__framework_1_1core_1_1lifecycle_1_1IActivity.xhtml) &gt; simulation\_framework::core::IStandaloneActivityCreator::Create  ( [const](classsimulation__framework_1_1core_1_1Topic.xhtml) core::StandaloneInitData &amp;  *standalone\_init\_data*)   pure virtual 

Create an std::unique\_ptr&lt;IActivity&gt; which will be scheduled remotely through scheduling event.

Parameters standalone\_init\_dataThe class contains inputs required for this Standalone Activity. The StandaloneActivityCreator is responsible to decode this properly and use the inputs data for initialization of BaseActivity ReturnsA pointer of IActivity interface which will be controlled remotely by simfwk core 



<a id="a61fa7488f9850ed80c0f102da8a966bd" name="a61fa7488f9850ed80c0f102da8a966bd"></a>## [◆ ](#a61fa7488f9850ed80c0f102da8a966bd)GetName()

 [virtual](classsimulation__framework_1_1core_1_1Topic.xhtml) std::string simulation\_framework::core::IStandaloneActivityCreator::GetName  ( )   pure virtual 

Returnsthe name of this standalone activity 



---

The documentation for this class was generated from the following file:- [i\_standalone\_activity\_creator.h](i__standalone__activity__creator_8h_source.xhtml)