Class CmdLineParser

Inheritance Relationships

Derived Type

Class Documentation

class CmdLineParser

Subclassed by iox::config::CmdLineParserConfigFileOption

Public Types

enum class CmdLineArgumentParsingMode

Values:

enumerator ALL
enumerator ONE

Public Functions

CmdLineParser() noexcept = default
virtual ~CmdLineParser() noexcept = default
CmdLineParser &operator=(const CmdLineParser &other) = delete
CmdLineParser(const CmdLineParser &other) = delete
CmdLineParser &operator=(CmdLineParser&&) = delete
CmdLineParser(CmdLineParser &&other) = delete
virtual cxx::expected<CmdLineArgs_t, CmdLineParserResult> parse(int argc, char *argv[], const CmdLineArgumentParsingMode cmdLineParsingMode = CmdLineArgumentParsingMode::ALL) noexcept

process the passed command line arguments

Parameters:
  • argc[in] forwarding of command line arguments

  • argv[in] forwarding of command line arguments

  • cmdLineParsingMode[in] selects to parse a single option or all options

  • Result[out] wrapped in an cxx::expected, either the parsed arguments as CmdLineArgs_t struct or CmdLineParserResult

Protected Attributes

bool m_run = {true}
iox::log::LogLevel m_logLevel = {iox::log::LogLevel::kWarn}
roudi::MonitoringMode m_monitoringMode = {roudi::MonitoringMode::ON}
version::CompatibilityCheckLevel m_compatibilityCheckLevel = {version::CompatibilityCheckLevel::PATCH}
cxx::optional<uint16_t> m_uniqueRouDiId
units::Duration m_processKillDelay = {roudi::PROCESS_DEFAULT_KILL_DELAY}