Skip to content

Class CommandLineParser#

ClassList > CommandLineParser

Public Functions#

Type Name
bool AddArgument (const CommandArgument & arg, const CommandArgument & parent=CommandArgument())
bool AddOption (const CommandOption & option, const CommandArgument & parent=CommandArgument())
bool AddOptions (const QList< CommandOption > & options, const CommandArgument & parent=CommandArgument())
CommandLineParser ()
CommandOption addHelpOption ()
CommandOption addVersionOption ()
bool isSet (const CommandArgument & arg) const
bool isSet (const CommandOption & option) const
bool parse (const QStringList & args)
CommandArgument rootArgument () const
void setDescription (const QString & description)
void setGeneralErrorMessage (const QString & msg)
QString value (const CommandOption & option) const

Public Functions Documentation#

function AddArgument#

bool CommandLineParser::AddArgument (
    const CommandArgument & arg,
    const CommandArgument & parent=CommandArgument ()
) 

function AddOption#

bool CommandLineParser::AddOption (
    const CommandOption & option,
    const CommandArgument & parent=CommandArgument ()
) 

function AddOptions#

bool CommandLineParser::AddOptions (
    const QList< CommandOption > & options,
    const CommandArgument & parent=CommandArgument ()
) 

function CommandLineParser#

CommandLineParser::CommandLineParser () 

function addHelpOption#

CommandOption CommandLineParser::addHelpOption () 

function addVersionOption#

CommandOption CommandLineParser::addVersionOption () 

function isSet [1/2]#

bool CommandLineParser::isSet (
    const CommandArgument & arg
) const

function isSet [2/2]#

bool CommandLineParser::isSet (
    const CommandOption & option
) const

function parse#

bool CommandLineParser::parse (
    const QStringList & args
) 

function rootArgument#

inline CommandArgument CommandLineParser::rootArgument () const

function setDescription#

void CommandLineParser::setDescription (
    const QString & description
) 

function setGeneralErrorMessage#

void CommandLineParser::setGeneralErrorMessage (
    const QString & msg
) 

function value#

QString CommandLineParser::value (
    const CommandOption & option
) const