RTC Toolkit 5.1.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rtctk::componentFramework::Args Class Reference

Class used to parse default command line arguments. More...

#include <rtctk/componentFramework/rtcComponentArgs.hpp>

Public Member Functions

 Args (int argc, char **argv)
 Constructor for Args class.
 
std::string GetComponentName () const
 Get component name or identifier.
 
elt::mal::Uri GetServiceDiscEndpoint () const
 Get service discovery endpoint.
 
std::optional< std::filesystem::path > GetLogPropsFile () const
 Get name of optionally provided log4cplus log properties file.
 
bool GetDebugMode () const
 Get debug mode.
 
std::optional< elt::mal::Uri > GetModelExportFile () const
 Get name of optionally provided state machine model export file.
 
void Parse ()
 do the actual parsing of CLI
 
int PrintHelpOrErrMsg (const CLI::Error &e) const
 Print parsing help/version msg or error msg, and return 0 or 1.
 

Detailed Description

Class used to parse default command line arguments.

Constructor & Destructor Documentation

◆ Args()

rtctk::componentFramework::Args::Args ( int argc,
char ** argv )

Constructor for Args class.

Member Function Documentation

◆ GetComponentName()

std::string rtctk::componentFramework::Args::GetComponentName ( ) const

Get component name or identifier.

Returns
component name as a string

◆ GetDebugMode()

bool rtctk::componentFramework::Args::GetDebugMode ( ) const

Get debug mode.

Returns
true if started in debug mode (default=false);

◆ GetLogPropsFile()

std::optional< std::filesystem::path > rtctk::componentFramework::Args::GetLogPropsFile ( ) const

Get name of optionally provided log4cplus log properties file.

Returns
log property file endpoint in URI format.

◆ GetModelExportFile()

std::optional< elt::mal::Uri > rtctk::componentFramework::Args::GetModelExportFile ( ) const

Get name of optionally provided state machine model export file.

Returns
state machine model export file in URI format.

◆ GetServiceDiscEndpoint()

elt::mal::Uri rtctk::componentFramework::Args::GetServiceDiscEndpoint ( ) const

Get service discovery endpoint.

Returns
service discovery endpoint in URI format.

◆ Parse()

void rtctk::componentFramework::Args::Parse ( )

do the actual parsing of CLI

◆ PrintHelpOrErrMsg()

int rtctk::componentFramework::Args::PrintHelpOrErrMsg ( const CLI::Error & e) const

Print parsing help/version msg or error msg, and return 0 or 1.

Parameters
eCLI error code
Returns
EXIT_SUCCESS - 0 in case of success, ask for help or version, or EXIT_FAILURE - 1 in case of an CLI error
Exceptions
CLI::ParseError- CLI11 parsing exception

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