    

 ## On this page

  

 

 # cli\_provider

 Last update: 16.07.2025 

<a id="l00001" name="l00001"></a> 1 

<a id="l00003" name="l00003"></a> 3 

<a id="l00004" name="l00004"></a> 4\#pragma once

<a id="l00005" name="l00005"></a> 5 

<a id="l00006" name="l00006"></a> 6\#include "autonomy/simulation/sim\_instance/i\_sim\_instance\_creator.h"

<a id="l00007" name="l00007"></a> 7\#include "core/service/cli/cli.h"

<a id="l00008" name="l00008"></a> 8 

<a id="l00013" name="l00013"></a> 13namespace [simulation\_framework](namespacesimulation__framework.xhtml)

<a id="l00014" name="l00014"></a> 14{

<a id="l00015" name="l00015"></a> 15 

<a id="l00020" name="l00020"></a> 20namespace [autonomy](namespaceautonomy.xhtml)

<a id="l00021" name="l00021"></a> 21{

<a id="l00022" name="l00022"></a> 22 

<a id="l00027" name="l00027"></a> 27namespace [cli](namespacecli.xhtml)

<a id="l00028" name="l00028"></a> 28{

<a id="l00029" name="l00029"></a> 29 

<a id="l00070" name="l00070"></a> 70 

<a id="l00071" name="l00071"></a>[ 71](classsimulation__framework_1_1autonomy_1_1cli_1_1CliProvider.xhtml)class [CliProvider](classsimulation__framework_1_1autonomy_1_1cli_1_1CliProvider.xhtml) final

<a id="l00072" name="l00072"></a> 72{

<a id="l00073" name="l00073"></a> 73 public:

<a id="l00077" name="l00077"></a>[ 77](classsimulation__framework_1_1autonomy_1_1cli_1_1CliProvider.xhtml#aaa4a83f8ce6c7532b64621c25a646eb3) [CliProvider](classsimulation__framework_1_1autonomy_1_1cli_1_1CliProvider.xhtml#aaa4a83f8ce6c7532b64621c25a646eb3)(std::unique_ptr&lt;ISimInstanceCreator&gt; sim_instance_creator);

<a id="l00078" name="l00078"></a> 78 

<a id="l00080" name="l00080"></a>[ 80](classsimulation__framework_1_1autonomy_1_1cli_1_1CliProvider.xhtml#ad471556a9f2093e7678b580843827f12) [~CliProvider](classsimulation__framework_1_1autonomy_1_1cli_1_1CliProvider.xhtml#ad471556a9f2093e7678b580843827f12)() = default;

<a id="l00081" name="l00081"></a> 81 

<a id="l00084" name="l00084"></a>[ 84](classsimulation__framework_1_1autonomy_1_1cli_1_1CliProvider.xhtml#a5989884eebef1c6a32141f72b7842b9f) const std::unique_ptr&lt;core::Cli&gt;&amp; [GetCommandLineInterface](classsimulation__framework_1_1autonomy_1_1cli_1_1CliProvider.xhtml#a5989884eebef1c6a32141f72b7842b9f)();

<a id="l00085" name="l00085"></a> 85 

<a id="l00088" name="l00088"></a>[ 88](classsimulation__framework_1_1autonomy_1_1cli_1_1CliProvider.xhtml#a632fd12769ad3ba2aecaf2d854602e9a) [core::SimulationParameters](structsimulation__framework_1_1core_1_1SimulationParameters.xhtml) [GetCoreParameters](classsimulation__framework_1_1autonomy_1_1cli_1_1CliProvider.xhtml#a632fd12769ad3ba2aecaf2d854602e9a)() const;

<a id="l00089" name="l00089"></a> 89 

<a id="l00098" name="l00098"></a>[ 98](classsimulation__framework_1_1autonomy_1_1cli_1_1CliProvider.xhtml#abd689d5923a3218f0acb267f080ec591) bool [Parse](classsimulation__framework_1_1autonomy_1_1cli_1_1CliProvider.xhtml#abd689d5923a3218f0acb267f080ec591)(int argc, const char** argv);

<a id="l00099" name="l00099"></a> 99 

<a id="l00100" name="l00100"></a> 100 private:

<a id="l00101" name="l00101"></a> 101 [core::SimulationParameters](structsimulation__framework_1_1core_1_1SimulationParameters.xhtml) core_parameters_{};

<a id="l00102" name="l00102"></a> 102 std::unique_ptr&lt;core::Cli&gt; cli_;

<a id="l00103" name="l00103"></a> 103 std::unique_ptr&lt;ISimInstanceCreator&gt; sim_instance_creator_;

<a id="l00104" name="l00104"></a> 104};



<a id="l00105" name="l00105"></a> 105 

<a id="l00106" name="l00106"></a> 106} // namespace cli

<a id="l00107" name="l00107"></a> 107} // namespace autonomy

<a id="l00108" name="l00108"></a> 108} // namespace simulation\_framework

[simulation\_framework::autonomy::cli::CliProvider](classsimulation__framework_1_1autonomy_1_1cli_1_1CliProvider.xhtml)

Provides a command-line interface for simulation execution via dependency injection.

**Definition** [cli\_provider.h:72](cli__provider_8h_source.xhtml#l00071)



[simulation\_framework::autonomy::cli::CliProvider::GetCommandLineInterface](classsimulation__framework_1_1autonomy_1_1cli_1_1CliProvider.xhtml#a5989884eebef1c6a32141f72b7842b9f)

const std::unique_ptr&lt; core::Cli &gt; &amp; GetCommandLineInterface()

Accesser of Cli reference.



[simulation\_framework::autonomy::cli::CliProvider::GetCoreParameters](classsimulation__framework_1_1autonomy_1_1cli_1_1CliProvider.xhtml#a632fd12769ad3ba2aecaf2d854602e9a)

core::SimulationParameters GetCoreParameters() const

Accesser of simulation parameters.



[simulation\_framework::autonomy::cli::CliProvider::CliProvider](classsimulation__framework_1_1autonomy_1_1cli_1_1CliProvider.xhtml#aaa4a83f8ce6c7532b64621c25a646eb3)

CliProvider(std::unique_ptr&lt; ISimInstanceCreator &gt; sim_instance_creator)

Construct CliProvider to execute simulation based on given instance through command line options or a...



[simulation\_framework::autonomy::cli::CliProvider::Parse](classsimulation__framework_1_1autonomy_1_1cli_1_1CliProvider.xhtml#abd689d5923a3218f0acb267f080ec591)

bool Parse(int argc, const char **argv)

Parses command-line arguments.



[simulation\_framework::autonomy::cli::CliProvider::~CliProvider](classsimulation__framework_1_1autonomy_1_1cli_1_1CliProvider.xhtml#ad471556a9f2093e7678b580843827f12)

~CliProvider()=default

Default Destructor.



[autonomy](namespaceautonomy.xhtml)

The namespace for all autonomy specific functionalities.



[cli](namespacecli.xhtml)

The namespace for command line interface feature under autonomy.



[simulation\_framework](namespacesimulation__framework.xhtml)

The top namespace for simulation framework.



[simulation\_framework::core::SimulationParameters](structsimulation__framework_1_1core_1_1SimulationParameters.xhtml)

The SimulationParameters struct encapsulates parameters related to simfwk-core configuration.

**Definition** [simulation\_parameters.h:29](simulation__parameters_8h_source.xhtml#l00028)