LibCppCmd v1.0 Beta 15
C++ Command Line Parsing Library
Loading...
Searching...
No Matches
Public Attributes | List of all members
CmdLine::Option::Definition Struct Reference

This Definition is used to construct an Option. More...

#include <Option.h>

Inheritance diagram for CmdLine::Option::Definition:
CmdLine::ValueOption::Definition

Public Attributes

char shortName = 0
 The short name of the Option.
 
std::string longName
 The long name of the Option.
 
std::string description
 The description of the Option.
 
bool isMandatory = false
 Determines whether the Option is mandatory.
 
Style style = Style::Unix
 Determines the Option::Style of the option.
 

Detailed Description

This Definition is used to construct an Option.

An Option::Definition is passed to the constructor of a new Option to specify its attributes.

Member Data Documentation

◆ description

std::string CmdLine::Option::Definition::description

The description of the Option.

See also
Option::Description().

◆ isMandatory

bool CmdLine::Option::Definition::isMandatory = false

Determines whether the Option is mandatory.

See also
Option::IsMandatory().

◆ longName

std::string CmdLine::Option::Definition::longName

The long name of the Option.

The longName of an Option is a sequence of characters representing the Option. Depending on the Option::Style used, the Option will automatically add the appropreate prefix (– for Options with the Unix style and / for Options with the Windows style). If the longName is "print", an Option with the Unix style will be specified by the "--print" argument at the CommandLine and an Option with the Windows style will be specified by the "/print" argument.

◆ shortName

char CmdLine::Option::Definition::shortName = 0

The short name of the Option.

The shortName of an Option is just a single character representing the Option. Depending on the Option::Style used, the Option will automatically add the appropreate prefix (- for Options with the Unix style and / for Options with the Windows style). If the shortName is 'p', an Option with the Unix style will be specified by the "-p" argument at the command line and an Option with the Windows style will be specified by the "/p" argument.

◆ style

Style CmdLine::Option::Definition::style = Style::Unix

Determines the Option::Style of the option.

See also
Option::Style.

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