Skip to main content

AVxcelerate Simulation Framework 2025 R1

simulation_framework::core::CliParser Class Reference

Last update: 16.07.2025

Command-line argument parser for simulation framework. More...

#include <cli_parser.h>

Public Member Functions

bool Parse (int argc, const char **argv)
 Takes the command-line arguments and parses them. More...
 
std::string GetParserMessage () const
 Returns information provided by the parser (e.g., errors or help), if applicable. More...
 
const SimulationParametersGetSimulationParameters () const
 Returns the simulation framework core parameters. More...
 
std::optional< std::string > GetInputFileByName (const std::string &name) const
 Retrieves the input file path by its name. More...
 
std::string GetSimulationConfig () const
 Returns the simulation configuration for the application level. More...
 

Detailed Description

Command-line argument parser for simulation framework.

The CliParser class provides generic functionality to parse command-line arguments and extract simulation-related parameters, configuration, and input files. It helps in converting command-line input into structured simulation parameters.

See also
SimulationParameters, File

Member Function Documentation

◆ GetInputFileByName()

std::optional<std::string> simulation_framework::core::CliParser::GetInputFileByName ( const std::string &  name) const

Retrieves the input file path by its name.

Parameters
nameThe name of the input file to retrieve.
Returns
An optional string containing the file path if it exists; otherwise, std::nullopt.

◆ GetParserMessage()

std::string simulation_framework::core::CliParser::GetParserMessage ( ) const

Returns information provided by the parser (e.g., errors or help), if applicable.

Returns
A string containing parser information.

◆ GetSimulationConfig()

std::string simulation_framework::core::CliParser::GetSimulationConfig ( ) const

Returns the simulation configuration for the application level.

Returns
A string containing the simulation configuration.

◆ GetSimulationParameters()

const SimulationParameters& simulation_framework::core::CliParser::GetSimulationParameters ( ) const

Returns the simulation framework core parameters.

Returns
A constant reference to SimulationParameters.

◆ Parse()

bool simulation_framework::core::CliParser::Parse ( int  argc,
const char **  argv 
)

Takes the command-line arguments and parses them.

Returns false if there is a parse error; otherwise, returns true.

Parameters
argcThe number of arguments.
argvAn array of argument strings.
Returns
true if parsing is successful; false otherwise.

The documentation for this class was generated from the following file:

Connect with Ansys