    

 ## 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 name="pub-methods"></a>Public Member Functions

virtual std::string [GetName](classsimulation__framework_1_1core_1_1IStandaloneActivityCreator.xhtml#a61fa7488f9850ed80c0f102da8a966bd) ()=0 virtual 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#ad91de87a3b3f04a685f1423a059f8576) (\[\[maybe\_unused\]\] const core::StandaloneInitData &amp;standalone\_init\_data)=0 Create an std::unique\_ptr&lt;IActivity&gt; which will be scheduled remotely through scheduling event. [More...](classsimulation__framework_1_1core_1_1IStandaloneActivityCreator.xhtml#ad91de87a3b3f04a685f1423a059f8576)  
 <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 = Topic&lt;MsgToBePublished&gt;;

 using TopicSubscribingOn = Topic&lt;MsgSubscribingOn&gt;;

 

 class MyActivityCreator : public IStandaloneActivityCreator

 {

 public:

 MyActivityCreator(const std::string&amp; name) : standalone_activity_name_(name) {}

 std::unique_ptr&lt;IActivity&gt; [Create](classsimulation__framework_1_1core_1_1IStandaloneActivityCreator.xhtml#ad91de87a3b3f04a685f1423a059f8576)(const core::StandaloneInitData&amp; standalone_init_data)

override

 {

 std::shared_ptr&lt;ITopic&gt; topic_going_to_publish = std::make_shared&lt;TopicToBePublished&gt;("TopicToBePublished");

 std::shared_ptr&lt;ITopic&gt; topic_want_to_receive = std::make_shared&lt;TopicSubscribingOn&gt;("TopicSubscribingOn");

 

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

 standalone_activity_name_, Topics{topic_going_to_publish, topic_want_to_receive}, MyLogic{});

 }

 std::string [GetName](classsimulation__framework_1_1core_1_1IStandaloneActivityCreator.xhtml#a61fa7488f9850ed80c0f102da8a966bd)() override { return standalone_activity_name_; }

 

 private:

 std::string standalone_activity_name_;

 };





## Member Function Documentation

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

 virtual std::unique\_ptr&lt;[core::lifecycle::IActivity](classsimulation__framework_1_1core_1_1lifecycle_1_1IActivity.xhtml)&gt; simulation\_framework::core::IStandaloneActivityCreator::Create  ( \[\[maybe\_unused\] \] const 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"></a>## [◆ ](#a61fa7488f9850ed80c0f102da8a966bd)GetName()

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