QtBase  v6.3.1
Classes | Public Member Functions | Public Attributes | List of all members
QCommandLineParserPrivate Class Reference
Collaboration diagram for QCommandLineParserPrivate:
Collaboration graph
[legend]

Classes

struct  PositionalArgumentDefinition
 Documentation for positional arguments. More...
 

Public Member Functions

 QCommandLineParserPrivate ()
 
bool parse (const QStringList &args)
 
void checkParsed (const char *method)
 
QStringList aliases (const QString &name) const
 
QString helpText (bool includeQtOptions) const
 
bool registerFoundOption (const QString &optionName)
 
bool parseOptionValue (const QString &optionName, const QString &argument, QStringList::const_iterator *argumentIterator, QStringList::const_iterator argsEnd)
 
Q_NORETURN void showHelp (int exitCode, bool includeQtOptions)
 

Public Attributes

QString errorText
 Error text set when parse() returns false. More...
 
QList< QCommandLineOptioncommandLineOptionList
 The command line options used for parsing. More...
 
NameHash_t nameHash
 Hash mapping option names to their offsets in commandLineOptionList and optionArgumentList. More...
 
QHash< int, QStringListoptionValuesHash
 Option values found (only for options with a value) More...
 
QStringList optionNames
 Names of options found on the command line. More...
 
QStringList positionalArgumentList
 Arguments which did not belong to any option. More...
 
QStringList unknownOptionNames
 Names of options which were unknown. More...
 
QString description
 Application description. More...
 
QList< PositionalArgumentDefinitionpositionalArgumentDefinitions
 
QCommandLineParser::SingleDashWordOptionMode singleDashWordOptionMode
 The parsing mode for "-abc". More...
 
QCommandLineParser::OptionsAfterPositionalArgumentsMode optionsAfterPositionalArgumentsMode
 How to parse "arg -option". More...
 
bool builtinVersionOption
 Whether addVersionOption was called. More...
 
bool builtinHelpOption
 Whether addHelpOption was called. More...
 
bool needsParsing
 True if parse() needs to be called. More...
 

Detailed Description

Definition at line 60 of file qcommandlineparser.cpp.

Constructor & Destructor Documentation

◆ QCommandLineParserPrivate()

QCommandLineParserPrivate::QCommandLineParserPrivate ( )
inline

Definition at line 63 of file qcommandlineparser.cpp.

Member Function Documentation

◆ aliases()

QStringList QCommandLineParserPrivate::aliases ( const QString name) const

Definition at line 131 of file qcommandlineparser.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkParsed()

void QCommandLineParserPrivate::checkParsed ( const char *  method)

Definition at line 622 of file qcommandlineparser.cpp.

Here is the caller graph for this function:

◆ helpText()

QString QCommandLineParserPrivate::helpText ( bool  includeQtOptions) const

Definition at line 1123 of file qcommandlineparser.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse()

bool QCommandLineParserPrivate::parse ( const QStringList args)

Definition at line 697 of file qcommandlineparser.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseOptionValue()

bool QCommandLineParserPrivate::parseOptionValue ( const QString optionName,
const QString argument,
QStringList::const_iterator *  argumentIterator,
QStringList::const_iterator  argsEnd 
)

Definition at line 656 of file qcommandlineparser.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerFoundOption()

bool QCommandLineParserPrivate::registerFoundOption ( const QString optionName)

Definition at line 633 of file qcommandlineparser.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ showHelp()

Q_NORETURN void QCommandLineParserPrivate::showHelp ( int  exitCode,
bool  includeQtOptions 
)

Definition at line 1043 of file qcommandlineparser.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ builtinHelpOption

bool QCommandLineParserPrivate::builtinHelpOption

Whether addHelpOption was called.

Definition at line 124 of file qcommandlineparser.cpp.

◆ builtinVersionOption

bool QCommandLineParserPrivate::builtinVersionOption

Whether addVersionOption was called.

Definition at line 121 of file qcommandlineparser.cpp.

◆ commandLineOptionList

QList<QCommandLineOption> QCommandLineParserPrivate::commandLineOptionList

The command line options used for parsing.

Definition at line 85 of file qcommandlineparser.cpp.

◆ description

QString QCommandLineParserPrivate::description

Application description.

Definition at line 103 of file qcommandlineparser.cpp.

◆ errorText

QString QCommandLineParserPrivate::errorText

Error text set when parse() returns false.

Definition at line 82 of file qcommandlineparser.cpp.

◆ nameHash

NameHash_t QCommandLineParserPrivate::nameHash

Hash mapping option names to their offsets in commandLineOptionList and optionArgumentList.

Definition at line 88 of file qcommandlineparser.cpp.

◆ needsParsing

bool QCommandLineParserPrivate::needsParsing

True if parse() needs to be called.

Definition at line 127 of file qcommandlineparser.cpp.

◆ optionNames

QStringList QCommandLineParserPrivate::optionNames

Names of options found on the command line.

Definition at line 94 of file qcommandlineparser.cpp.

◆ optionsAfterPositionalArgumentsMode

QCommandLineParser::OptionsAfterPositionalArgumentsMode QCommandLineParserPrivate::optionsAfterPositionalArgumentsMode

How to parse "arg -option".

Definition at line 118 of file qcommandlineparser.cpp.

◆ optionValuesHash

QHash<int, QStringList> QCommandLineParserPrivate::optionValuesHash

Option values found (only for options with a value)

Definition at line 91 of file qcommandlineparser.cpp.

◆ positionalArgumentDefinitions

QList<PositionalArgumentDefinition> QCommandLineParserPrivate::positionalArgumentDefinitions

Definition at line 112 of file qcommandlineparser.cpp.

◆ positionalArgumentList

QStringList QCommandLineParserPrivate::positionalArgumentList

Arguments which did not belong to any option.

Definition at line 97 of file qcommandlineparser.cpp.

◆ singleDashWordOptionMode

QCommandLineParser::SingleDashWordOptionMode QCommandLineParserPrivate::singleDashWordOptionMode

The parsing mode for "-abc".

Definition at line 115 of file qcommandlineparser.cpp.

◆ unknownOptionNames

QStringList QCommandLineParserPrivate::unknownOptionNames

Names of options which were unknown.

Definition at line 100 of file qcommandlineparser.cpp.


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