autonomy/cli/cli_provider/cli_provider.h (line 72)
Provides a command-line interface for simulation execution via dependency injection.
This class facilitates the creation of a command-line executable that executes a simulation on a specific simulation instance. The simulation instance is provided through a concrete implementation of the ISimInstanceCreator interface, enabling flexibility and modularity.
The design supports scenarios where different simulation instances need to be created dynamically based on the implementation of the ISimInstanceCreator.
An example of executable creation using CliProvider.
See also: ISimInstanceCreator, core::SimulationParameters
Members
Public functions
Function CliProvider
- sim_instance_creator: An implementation of interface ‘ISimInstanceCreator’, showing how your simulation should be constructed
- std::unique_ptr< ISimInstanceCreator > sim_instance_creator
Function ~CliProvider
Function GetCommandLineInterface
Function GetCoreParameters
Function Parse
main function, allowing the application to configure or initialize based on the provided input. This function typically interprets options, flags, and positional arguments supplied via the command line.
Parameters:
- argc: The number of arguments passed to the program, including the executable name.
- argv: An array of C-style strings representing the arguments.
true if the arguments were successfully parsed; otherwise, false.
Parameters:
Return type: bool