Manticore  Version 1.0
Physics of Molecular Clouds
Public Member Functions | Public Attributes | List of all members
mutils::CommandLine::Option Struct Reference

Command line option specification. More...

#include <mutils/CommandLine.h>

Public Member Functions

std::string keyword () const
 Standard Options keyword name for this option. More...
 
std::string source () const
 Command line option source information (for Options::MetaValues). More...
 

Public Attributes

std::string helpText
 Option description (for --help). More...
 
std::string keyName
 Associated Options keyword name. More...
 
std::string longName
 Long option name. More...
 
std::string scopeName
 Associated Options scope name. More...
 
std::string sectName
 Associated Options section name. More...
 
char shortName
 Short option name. More...
 
std::string valueName
 Value name (for --help). More...
 

Detailed Description

Command line option specification.

Defines the dynamic command line interface for a single option. Each option has a corresponding Options file keyword, allowing automated processing of arbitrary command line arguments.

Users of this structure should note the following special values:

Definition at line 69 of file CommandLine.h.

Member Function Documentation

◆ keyword()

std::string mutils::CommandLine::Option::keyword ( ) const
inline

Standard Options keyword name for this option.

Returns keyName if not empty, else the default keyword name. The default keyword name is longName with hyphens removed and each term capitalized; e.g., log-file becomes LogFile. If longName is also empty, the single-character shortName (converted to uppercase) is used.

Returns
Keyword string.

Definition at line 89 of file CommandLine.h.

References keyName, longName, mutils::npos, mutils::nullStr(), and shortName.

◆ source()

std::string mutils::CommandLine::Option::source ( ) const
inline

Command line option source information (for Options::MetaValues).

Definition at line 105 of file CommandLine.h.

References longName, and shortName.

Member Data Documentation

◆ helpText

std::string mutils::CommandLine::Option::helpText

Option description (for --help).

Definition at line 76 of file CommandLine.h.

◆ keyName

std::string mutils::CommandLine::Option::keyName

Associated Options keyword name.

Definition at line 75 of file CommandLine.h.

Referenced by keyword().

◆ longName

std::string mutils::CommandLine::Option::longName

Long option name.

Definition at line 71 of file CommandLine.h.

Referenced by mutils::CommandLine::getOption(), keyword(), mutils::CommandLine::popOption(), and source().

◆ scopeName

std::string mutils::CommandLine::Option::scopeName

Associated Options scope name.

Definition at line 73 of file CommandLine.h.

◆ sectName

std::string mutils::CommandLine::Option::sectName

Associated Options section name.

Definition at line 74 of file CommandLine.h.

◆ shortName

char mutils::CommandLine::Option::shortName

Short option name.

Definition at line 70 of file CommandLine.h.

Referenced by mutils::CommandLine::getOption(), keyword(), mutils::CommandLine::popOption(), and source().

◆ valueName

std::string mutils::CommandLine::Option::valueName

Value name (for --help).

Definition at line 72 of file CommandLine.h.


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