Manticore
Version 1.5.3
Physics of Molecular Clouds
|
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... | |
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.
|
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.
Definition at line 89 of file CommandLine.h.
References std::string::empty(), std::string::erase(), std::string::find_first_of(), keyName, longName, mutils::npos, mutils::nullStr, shortName, and std::string::size().
|
inline |
Command line option source information (for Options::MetaValues).
Definition at line 105 of file CommandLine.h.
References std::string::empty(), longName, and shortName.
std::string mutils::CommandLine::Option::helpText |
Option description (for --help).
Definition at line 76 of file CommandLine.h.
std::string mutils::CommandLine::Option::keyName |
Associated Options keyword name.
Definition at line 75 of file CommandLine.h.
Referenced by keyword().
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().
std::string mutils::CommandLine::Option::scopeName |
Associated Options scope name.
Definition at line 73 of file CommandLine.h.
std::string mutils::CommandLine::Option::sectName |
Associated Options section name.
Definition at line 74 of file CommandLine.h.
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().
std::string mutils::CommandLine::Option::valueName |
Value name (for --help).
Definition at line 72 of file CommandLine.h.