MythTV  master
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
MythCommandLineParser Class Reference

Parent class for defining application command line parsers. More...

#include <mythcommandlineparser.h>

Inheritance diagram for MythCommandLineParser:
Inheritance graph
[legend]

Public Types

enum  Result {
  Result::kEnd = 0, Result::kEmpty = 1, Result::kOptOnly = 2, Result::kOptVal = 3,
  Result::kCombOptVal = 4, Result::kArg = 5, Result::kPassthrough = 6, Result::kInvalid = 7
}
 

Public Member Functions

 MythCommandLineParser (QString appname)
 Default constructor for MythCommandLineArg class. More...
 
 ~MythCommandLineParser ()
 
virtual void LoadArguments (void)
 
void PrintHelp (void) const
 Print command line option help. More...
 
QString GetHelpString (void) const
 Generate command line option help text. More...
 
virtual QString GetHelpHeader (void) const
 
virtual bool Parse (int argc, const char *const *argv)
 Loop through argv and populate arguments with values. More...
 
CommandLineArgadd (const QString &arg, const QString &name, bool def, QString help, QString longhelp)
 
CommandLineArgadd (const QString &arg, const QString &name, int def, QString help, QString longhelp)
 
CommandLineArgadd (const QString &arg, const QString &name, uint def, QString help, QString longhelp)
 
CommandLineArgadd (const QString &arg, const QString &name, long long def, QString help, QString longhelp)
 
CommandLineArgadd (const QString &arg, const QString &name, double def, QString help, QString longhelp)
 
CommandLineArgadd (const QString &arg, const QString &name, const char *def, QString help, QString longhelp)
 
CommandLineArgadd (const QString &arg, const QString &name, const QString &def, QString help, QString longhelp)
 
CommandLineArgadd (const QString &arg, const QString &name, QSize def, QString help, QString longhelp)
 
CommandLineArgadd (const QString &arg, const QString &name, const QDateTime &def, QString help, QString longhelp)
 
CommandLineArgadd (const QString &arg, const QString &name, QVariant::Type type, QString help, QString longhelp)
 
CommandLineArgadd (const QString &arg, const QString &name, QVariant::Type type, QVariant def, QString help, QString longhelp)
 
CommandLineArgadd (QStringList arglist, const QString &name, bool def, QString help, QString longhelp)
 
CommandLineArgadd (QStringList arglist, const QString &name, int def, QString help, QString longhelp)
 
CommandLineArgadd (QStringList arglist, const QString &name, uint def, QString help, QString longhelp)
 
CommandLineArgadd (QStringList arglist, const QString &name, long long def, QString help, QString longhelp)
 
CommandLineArgadd (QStringList arglist, const QString &name, double def, QString help, QString longhelp)
 
CommandLineArgadd (QStringList arglist, const QString &name, const char *def, QString help, QString longhelp)
 
CommandLineArgadd (QStringList arglist, const QString &name, const QString &def, QString help, QString longhelp)
 
CommandLineArgadd (QStringList arglist, const QString &name, QSize def, QString help, QString longhelp)
 
CommandLineArgadd (QStringList arglist, const QString &name, const QDateTime &def, QString help, QString longhelp)
 
CommandLineArgadd (QStringList arglist, const QString &name, QVariant::Type type, QString help, QString longhelp)
 
CommandLineArgadd (QStringList arglist, const QString &name, QVariant::Type type, QVariant def, QString help, QString longhelp)
 Add a new command line argument. More...
 
QVariant operator[] (const QString &name)
 Returned stored QVariant for given argument, or default value if not used. More...
 
QStringList GetArgs (void) const
 Return list of additional values provided on the command line independent of any keyword. More...
 
QMap< QString, QString > GetExtra (void) const
 Return map of additional key/value pairs provided on the command line independent of any registered argument. More...
 
QString GetPassthrough (void) const
 Return any text supplied on the command line after a bare '–'. More...
 
QMap< QString, QString > GetSettingsOverride (void)
 Return map of key/value pairs provided to override database options. More...
 
QString GetLogFilePath (void)
 Helper utility for logging interface to pull path from –logpath. More...
 
int GetSyslogFacility (void) const
 Helper utility for logging interface to return syslog facility. More...
 
LogLevel_t GetLogLevel (void) const
 Helper utility for logging interface to filtering level. More...
 
QString GetAppName (void) const
 
bool toBool (const QString &key) const
 Returns stored QVariant as a boolean. More...
 
int toInt (const QString &key) const
 Returns stored QVariant as an integer, falling to default if not provided. More...
 
uint toUInt (const QString &key) const
 Returns stored QVariant as an unsigned integer, falling to default if not provided. More...
 
long long toLongLong (const QString &key) const
 Returns stored QVariant as a long integer, falling to default if not provided. More...
 
double toDouble (const QString &key) const
 Returns stored QVariant as double floating point value, falling to default if not provided. More...
 
QSize toSize (const QString &key) const
 Returns stored QVariant as a QSize value, falling to default if not provided. More...
 
QString toString (const QString &key) const
 Returns stored QVariant as a QString, falling to default if not provided. More...
 
QStringList toStringList (const QString &key, const QString &sep="") const
 Returns stored QVariant as a QStringList, falling to default if not provided. More...
 
QMap< QString, QString > toMap (const QString &key) const
 Returns stored QVariant as a QMap, falling to default if not provided. More...
 
QDateTime toDateTime (const QString &key) const
 Returns stored QVariant as a QDateTime, falling to default if not provided. More...
 
bool SetValue (const QString &key, const QVariant &value)
 Set a new stored value for an existing argument definition, or spawn a new definition store value in. More...
 
int ConfigureLogging (const QString &mask="general", bool progress=false)
 Read in logging options and initialize the logging interface. More...
 
void ApplySettingsOverride (void)
 Apply all overrides to the global context. More...
 
int Daemonize (void) const
 Fork application into background, and detatch from terminal. More...
 

Static Public Member Functions

static void PrintVersion (void)
 Print application version information. More...
 
static const char * NamedOptType (Result type)
 

Public Attributes

friend TestCommandLineParser
 

Protected Member Functions

void allowArgs (bool allow=true)
 Specify that parser should allow and collect values provided independent of any keyword. More...
 
void allowExtras (bool allow=true)
 Specify that parser should allow and collect additional key/value pairs not explicitly defined for processing. More...
 
void allowPassthrough (bool allow=true)
 Specify that parser should allow a bare '–', and collect all subsequent text as a QString. More...
 
void addHelp (void)
 Canned argument definition for –help. More...
 
void addVersion (void)
 Canned argument definition for –version. More...
 
void addWindowed (void)
 Canned argument definition for –windowed and -no-windowed. More...
 
void addMouse (void)
 Canned argument definition for –mouse-cursor and –no-mouse-cursor. More...
 
void addDaemon (void)
 Canned argument definition for –daemon. More...
 
void addSettingsOverride (void)
 Canned argument definition for –override-setting and –override-settings-file. More...
 
void addRecording (void)
 Canned argument definition for –chanid and –starttime. More...
 
void addGeometry (void)
 Canned argument definition for –geometry. More...
 
void addDisplay (void)
 Canned argument definition for -display. More...
 
void addUPnP (void)
 Canned argument definition for –noupnp. More...
 
void addLogging (const QString &defaultVerbosity="general", LogLevel_t defaultLogLevel=LOG_INFO)
 Canned argument definition for all logging options, including –verbose, –logpath, –quiet, –loglevel, –syslog, and –enable-dblog. More...
 
void addPIDFile (void)
 Canned argument definition for –pidfile. More...
 
void addJob (void)
 Canned argument definition for –jobid. More...
 
void addInFile (bool addOutFile=false)
 Canned argument definition for –infile and –outfile. More...
 
void addPlatform (void)
 Pass through the platform argument to Qt for GUI applications. More...
 

Private Member Functions

Result getOpt (int argc, const char *const *argv, int &argpos, QString &opt, QByteArray &val)
 Internal use. More...
 
bool ReconcileLinks (void)
 Replace dummy arguments used to define interdependency with pointers to their real counterparts. More...
 

Private Attributes

QString m_appname
 
QMap< QString, CommandLineArg * > m_optionedArgs
 
QMap< QString, CommandLineArg * > m_namedArgs
 
bool m_passthroughActive {false}
 
bool m_overridesImported {false}
 
bool m_verbose {false}
 

Detailed Description

Parent class for defining application command line parsers.

This class provides a generic interface for defining and parsing available command line options. Options can be provided manually using the add() method, or one of several canned add*() methods. Once defined, the command line is parsed using the Parse() method, and results are available through Qt standard to<Type>() methods.

Definition at line 115 of file mythcommandlineparser.h.

Member Enumeration Documentation

◆ Result

Enumerator
kEnd 
kEmpty 
kOptOnly 
kOptVal 
kCombOptVal 
kArg 
kPassthrough 
kInvalid 

Definition at line 120 of file mythcommandlineparser.h.

Constructor & Destructor Documentation

◆ MythCommandLineParser()

MythCommandLineParser::MythCommandLineParser ( QString  appname)
explicit

Default constructor for MythCommandLineArg class.

Definition at line 1165 of file mythcommandlineparser.cpp.

◆ ~MythCommandLineParser()

MythCommandLineParser::~MythCommandLineParser ( )

Definition at line 1177 of file mythcommandlineparser.cpp.

Member Function Documentation

◆ LoadArguments()

virtual void MythCommandLineParser::LoadArguments ( void  )
inlinevirtual

◆ PrintVersion()

void MythCommandLineParser::PrintVersion ( void  )
static

Print application version information.

Definition at line 1265 of file mythcommandlineparser.cpp.

Referenced by main().

◆ PrintHelp()

void MythCommandLineParser::PrintHelp ( void  ) const

Print command line option help.

Definition at line 1281 of file mythcommandlineparser.cpp.

Referenced by main().

◆ GetHelpString()

QString MythCommandLineParser::GetHelpString ( void  ) const

Generate command line option help text.

Generates generic help or specific help, depending on whether a value was provided to the –help option

Definition at line 1292 of file mythcommandlineparser.cpp.

Referenced by PrintHelp().

◆ GetHelpHeader()

virtual QString MythCommandLineParser::GetHelpHeader ( void  ) const
inlinevirtual

◆ NamedOptType()

const char * MythCommandLineParser::NamedOptType ( Result  type)
static

Definition at line 117 of file mythcommandlineparser.cpp.

Referenced by Parse().

◆ Parse()

bool MythCommandLineParser::Parse ( int  argc,
const char *const *  argv 
)
virtual

Loop through argv and populate arguments with values.

This should not be called until all arguments are added to the parser. This returns false if the parser hits an argument it is not designed to handle.

Definition at line 1437 of file mythcommandlineparser.cpp.

Referenced by main().

◆ add() [1/22]

CommandLineArg* MythCommandLineParser::add ( const QString &  arg,
const QString &  name,
bool  def,
QString  help,
QString  longhelp 
)
inline

◆ add() [2/22]

CommandLineArg* MythCommandLineParser::add ( const QString &  arg,
const QString &  name,
int  def,
QString  help,
QString  longhelp 
)
inline

Definition at line 150 of file mythcommandlineparser.h.

◆ add() [3/22]

CommandLineArg* MythCommandLineParser::add ( const QString &  arg,
const QString &  name,
uint  def,
QString  help,
QString  longhelp 
)
inline

Definition at line 155 of file mythcommandlineparser.h.

◆ add() [4/22]

CommandLineArg* MythCommandLineParser::add ( const QString &  arg,
const QString &  name,
long long  def,
QString  help,
QString  longhelp 
)
inline

Definition at line 160 of file mythcommandlineparser.h.

◆ add() [5/22]

CommandLineArg* MythCommandLineParser::add ( const QString &  arg,
const QString &  name,
double  def,
QString  help,
QString  longhelp 
)
inline

Definition at line 165 of file mythcommandlineparser.h.

◆ add() [6/22]

CommandLineArg* MythCommandLineParser::add ( const QString &  arg,
const QString &  name,
const char *  def,
QString  help,
QString  longhelp 
)
inline

Definition at line 170 of file mythcommandlineparser.h.

◆ add() [7/22]

CommandLineArg* MythCommandLineParser::add ( const QString &  arg,
const QString &  name,
const QString &  def,
QString  help,
QString  longhelp 
)
inline

Definition at line 175 of file mythcommandlineparser.h.

◆ add() [8/22]

CommandLineArg* MythCommandLineParser::add ( const QString &  arg,
const QString &  name,
QSize  def,
QString  help,
QString  longhelp 
)
inline

Definition at line 180 of file mythcommandlineparser.h.

◆ add() [9/22]

CommandLineArg* MythCommandLineParser::add ( const QString &  arg,
const QString &  name,
const QDateTime &  def,
QString  help,
QString  longhelp 
)
inline

Definition at line 185 of file mythcommandlineparser.h.

◆ add() [10/22]

CommandLineArg* MythCommandLineParser::add ( const QString &  arg,
const QString &  name,
QVariant::Type  type,
QString  help,
QString  longhelp 
)
inline

Definition at line 190 of file mythcommandlineparser.h.

◆ add() [11/22]

CommandLineArg* MythCommandLineParser::add ( const QString &  arg,
const QString &  name,
QVariant::Type  type,
QVariant  def,
QString  help,
QString  longhelp 
)
inline

Definition at line 195 of file mythcommandlineparser.h.

◆ add() [12/22]

CommandLineArg* MythCommandLineParser::add ( QStringList  arglist,
const QString &  name,
bool  def,
QString  help,
QString  longhelp 
)
inline

Definition at line 202 of file mythcommandlineparser.h.

◆ add() [13/22]

CommandLineArg* MythCommandLineParser::add ( QStringList  arglist,
const QString &  name,
int  def,
QString  help,
QString  longhelp 
)
inline

Definition at line 207 of file mythcommandlineparser.h.

◆ add() [14/22]

CommandLineArg* MythCommandLineParser::add ( QStringList  arglist,
const QString &  name,
uint  def,
QString  help,
QString  longhelp 
)
inline

Definition at line 212 of file mythcommandlineparser.h.

◆ add() [15/22]

CommandLineArg* MythCommandLineParser::add ( QStringList  arglist,
const QString &  name,
long long  def,
QString  help,
QString  longhelp 
)
inline

Definition at line 217 of file mythcommandlineparser.h.

◆ add() [16/22]

CommandLineArg* MythCommandLineParser::add ( QStringList  arglist,
const QString &  name,
double  def,
QString  help,
QString  longhelp 
)
inline

Definition at line 222 of file mythcommandlineparser.h.

◆ add() [17/22]

CommandLineArg* MythCommandLineParser::add ( QStringList  arglist,
const QString &  name,
const char *  def,
QString  help,
QString  longhelp 
)
inline

Definition at line 227 of file mythcommandlineparser.h.

◆ add() [18/22]

CommandLineArg* MythCommandLineParser::add ( QStringList  arglist,
const QString &  name,
const QString &  def,
QString  help,
QString  longhelp 
)
inline

Definition at line 232 of file mythcommandlineparser.h.

◆ add() [19/22]

CommandLineArg* MythCommandLineParser::add ( QStringList  arglist,
const QString &  name,
QSize  def,
QString  help,
QString  longhelp 
)
inline

Definition at line 237 of file mythcommandlineparser.h.

◆ add() [20/22]

CommandLineArg* MythCommandLineParser::add ( QStringList  arglist,
const QString &  name,
const QDateTime &  def,
QString  help,
QString  longhelp 
)
inline

Definition at line 242 of file mythcommandlineparser.h.

◆ add() [21/22]

CommandLineArg* MythCommandLineParser::add ( QStringList  arglist,
const QString &  name,
QVariant::Type  type,
QString  help,
QString  longhelp 
)
inline

Definition at line 247 of file mythcommandlineparser.h.

◆ add() [22/22]

CommandLineArg * MythCommandLineParser::add ( QStringList  arglist,
const QString &  name,
QVariant::Type  type,
QVariant  def,
QString  help,
QString  longhelp 
)

Add a new command line argument.

This is the primary method for adding new arguments for processing. There are several overloaded convenience methods that tie into this, allowing it to be called with fewer inputs.

Parameters
arglistlist of arguments to allow use of on the command line
nameinternal name to be used when pulling processed data out
typetype of variable to be processed. The allowed types are listed below.
defdefault value to provide if one is not supplied or option is not used
helpshort help text, displayed when printing all available options with '–help'. If this is empty, the argument will not be shown
longhelpExtended help text, displayed when help about a specific option is requested using '–help <option>'
Type Description
Bool set to value, or default if value is not provided
String set to value, or default if value is not provided
Int set to value, or behaves as counter for multiple uses if value is not provided
UInt
LongLong
Double
DateTime accepts ISO8601 and Myth's flattened version
StringList accepts multiple uses, appended as individual strings
Map accepts multiple pairs, in the syntax "key=value"
Size accepts size in the syntax "XxY"

Definition at line 1230 of file mythcommandlineparser.cpp.

◆ operator[]()

QVariant MythCommandLineParser::operator[] ( const QString &  name)

Returned stored QVariant for given argument, or default value if not used.

Definition at line 1813 of file mythcommandlineparser.cpp.

◆ GetArgs()

QStringList MythCommandLineParser::GetArgs ( void  ) const

Return list of additional values provided on the command line independent of any keyword.

Definition at line 1832 of file mythcommandlineparser.cpp.

Referenced by main().

◆ GetExtra()

QMap< QString, QString > MythCommandLineParser::GetExtra ( void  ) const

Return map of additional key/value pairs provided on the command line independent of any registered argument.

Definition at line 1840 of file mythcommandlineparser.cpp.

Referenced by SendMessage().

◆ GetPassthrough()

QString MythCommandLineParser::GetPassthrough ( void  ) const

Return any text supplied on the command line after a bare '–'.

Definition at line 1847 of file mythcommandlineparser.cpp.

Referenced by main(), and Parse().

◆ GetSettingsOverride()

QMap< QString, QString > MythCommandLineParser::GetSettingsOverride ( void  )

Return map of key/value pairs provided to override database options.

This method is used for the -O/–override-setting options, as well as the specific arguments to override the window border and mouse cursor. On its first use, this method will also read in any addition settings provided in the –override-settings-file

Definition at line 1859 of file mythcommandlineparser.cpp.

Referenced by ApplySettingsOverride().

◆ GetLogFilePath()

QString MythCommandLineParser::GetLogFilePath ( void  )

Helper utility for logging interface to pull path from –logpath.

Definition at line 2504 of file mythcommandlineparser.cpp.

Referenced by ConfigureLogging(), and main().

◆ GetSyslogFacility()

int MythCommandLineParser::GetSyslogFacility ( void  ) const

Helper utility for logging interface to return syslog facility.

Definition at line 2535 of file mythcommandlineparser.cpp.

Referenced by ConfigureLogging().

◆ GetLogLevel()

LogLevel_t MythCommandLineParser::GetLogLevel ( void  ) const

Helper utility for logging interface to filtering level.

Definition at line 2546 of file mythcommandlineparser.cpp.

Referenced by ConfigureLogging().

◆ GetAppName()

QString MythCommandLineParser::GetAppName ( void  ) const
inline

Definition at line 263 of file mythcommandlineparser.h.

◆ toBool()

bool MythCommandLineParser::toBool ( const QString &  key) const

Returns stored QVariant as a boolean.

If the stored value is of type boolean, this will return the actual stored or default value. For all other types, this will return whether the argument was supplied on the command line or not.

Definition at line 1943 of file mythcommandlineparser.cpp.

Referenced by CheckRecordings(), ClearEIT(), ConfigureLogging(), Daemonize(), FlagCommercials(), GetProgramInfo(), GetSettingsOverride(), handle_command(), main(), Parse(), pid_printer(), print_warnings(), QueueCommFlagJob(), run_backend(), ScanMusic(), and SendMessage().

◆ toInt()

int MythCommandLineParser::toInt ( const QString &  key) const

Returns stored QVariant as an integer, falling to default if not provided.

Definition at line 1965 of file mythcommandlineparser.cpp.

Referenced by CalcTrackLength(), ClearEIT(), ExtractImage(), FindLyrics(), main(), QueueJob(), and UpdateMeta().

◆ toUInt()

uint MythCommandLineParser::toUInt ( const QString &  key) const

Returns stored QVariant as an unsigned integer, falling to default if not provided.

Definition at line 1992 of file mythcommandlineparser.cpp.

Referenced by ConfigureLogging(), GetProgramInfo(), main(), pid_counter(), pid_filter(), and SendMessage().

◆ toLongLong()

long long MythCommandLineParser::toLongLong ( const QString &  key) const

Returns stored QVariant as a long integer, falling to default if not provided.

Definition at line 2019 of file mythcommandlineparser.cpp.

Referenced by ConfigureLogging(), and main().

◆ toDouble()

double MythCommandLineParser::toDouble ( const QString &  key) const

Returns stored QVariant as double floating point value, falling to default if not provided.

Definition at line 2046 of file mythcommandlineparser.cpp.

◆ toSize()

QSize MythCommandLineParser::toSize ( const QString &  key) const

Returns stored QVariant as a QSize value, falling to default if not provided.

Definition at line 2073 of file mythcommandlineparser.cpp.

Referenced by main().

◆ toString()

QString MythCommandLineParser::toString ( const QString &  key) const

◆ toStringList()

QStringList MythCommandLineParser::toStringList ( const QString &  key,
const QString &  sep = "" 
) const

Returns stored QVariant as a QStringList, falling to default if not provided.

Optional separator can be specified to split result if stored value is a QString.

Definition at line 2131 of file mythcommandlineparser.cpp.

Referenced by GetArgs(), GetPassthrough(), main(), Parse(), and SendEvent().

◆ toMap()

QMap< QString, QString > MythCommandLineParser::toMap ( const QString &  key) const

Returns stored QVariant as a QMap, falling to default if not provided.

Definition at line 2163 of file mythcommandlineparser.cpp.

Referenced by GetExtra(), and GetSettingsOverride().

◆ toDateTime()

QDateTime MythCommandLineParser::toDateTime ( const QString &  key) const

Returns stored QVariant as a QDateTime, falling to default if not provided.

Definition at line 2197 of file mythcommandlineparser.cpp.

Referenced by GetProgramInfo(), main(), and UpdateMeta().

◆ SetValue()

bool MythCommandLineParser::SetValue ( const QString &  key,
const QVariant &  value 
)

Set a new stored value for an existing argument definition, or spawn a new definition store value in.

Argument is subsequently marked as being provided on the command line.

Definition at line 2564 of file mythcommandlineparser.cpp.

Referenced by GetLogFilePath(), main(), and Parse().

◆ ConfigureLogging()

int MythCommandLineParser::ConfigureLogging ( const QString &  mask = "general",
bool  progress = false 
)

Read in logging options and initialize the logging interface.

Definition at line 2587 of file mythcommandlineparser.cpp.

Referenced by main().

◆ ApplySettingsOverride()

void MythCommandLineParser::ApplySettingsOverride ( void  )

Apply all overrides to the global context.

WARNING: this must not be called until after MythContext is initialized

Definition at line 2656 of file mythcommandlineparser.cpp.

Referenced by main().

◆ Daemonize()

int MythCommandLineParser::Daemonize ( void  ) const

Fork application into background, and detatch from terminal.

Definition at line 2762 of file mythcommandlineparser.cpp.

Referenced by main().

◆ allowArgs()

void MythCommandLineParser::allowArgs ( bool  allow = true)
protected

Specify that parser should allow and collect values provided independent of any keyword.

Definition at line 2224 of file mythcommandlineparser.cpp.

Referenced by MythAVTestCommandLineParser::LoadArguments(), MythExternRecorderCommandLineParser::LoadArguments(), and MythFileRecorderCommandLineParser::LoadArguments().

◆ allowExtras()

void MythCommandLineParser::allowExtras ( bool  allow = true)
protected

Specify that parser should allow and collect additional key/value pairs not explicitly defined for processing.

Definition at line 2241 of file mythcommandlineparser.cpp.

Referenced by MythUtilCommandLineParser::LoadArguments().

◆ allowPassthrough()

void MythCommandLineParser::allowPassthrough ( bool  allow = true)
protected

Specify that parser should allow a bare '–', and collect all subsequent text as a QString.

Definition at line 2260 of file mythcommandlineparser.cpp.

Referenced by MythFillDatabaseCommandLineParser::LoadArguments().

◆ addHelp()

void MythCommandLineParser::addHelp ( void  )
protected

◆ addVersion()

void MythCommandLineParser::addVersion ( void  )
protected

◆ addWindowed()

void MythCommandLineParser::addWindowed ( void  )
protected

Canned argument definition for –windowed and -no-windowed.

Definition at line 2300 of file mythcommandlineparser.cpp.

Referenced by MythAVTestCommandLineParser::LoadArguments(), MythFrontendCommandLineParser::LoadArguments(), and MythTVSetupCommandLineParser::LoadArguments().

◆ addMouse()

void MythCommandLineParser::addMouse ( void  )
protected

Canned argument definition for –mouse-cursor and –no-mouse-cursor.

Definition at line 2315 of file mythcommandlineparser.cpp.

Referenced by MythFrontendCommandLineParser::LoadArguments(), MythScreenWizardCommandLineParser::LoadArguments(), and MythTVSetupCommandLineParser::LoadArguments().

◆ addDaemon()

void MythCommandLineParser::addDaemon ( void  )
protected

◆ addSettingsOverride()

void MythCommandLineParser::addSettingsOverride ( void  )
protected

◆ addRecording()

void MythCommandLineParser::addRecording ( void  )
protected

◆ addGeometry()

void MythCommandLineParser::addGeometry ( void  )
protected

◆ addDisplay()

void MythCommandLineParser::addDisplay ( void  )
protected

◆ addUPnP()

void MythCommandLineParser::addUPnP ( void  )
protected

Canned argument definition for –noupnp.

Definition at line 2379 of file mythcommandlineparser.cpp.

Referenced by MythBackendCommandLineParser::LoadArguments(), and MythFrontendCommandLineParser::LoadArguments().

◆ addLogging()

void MythCommandLineParser::addLogging ( const QString &  defaultVerbosity = "general",
LogLevel_t  defaultLogLevel = LOG_INFO 
)
protected

◆ addPIDFile()

void MythCommandLineParser::addPIDFile ( void  )
protected

◆ addJob()

void MythCommandLineParser::addJob ( void  )
protected

◆ addInFile()

void MythCommandLineParser::addInFile ( bool  addOutFile = false)
protected

Canned argument definition for –infile and –outfile.

Definition at line 2475 of file mythcommandlineparser.cpp.

Referenced by MythAVTestCommandLineParser::LoadArguments(), MythFileRecorderCommandLineParser::LoadArguments(), and MythUtilCommandLineParser::LoadArguments().

◆ addPlatform()

void MythCommandLineParser::addPlatform ( void  )
protected

◆ getOpt()

MythCommandLineParser::Result MythCommandLineParser::getOpt ( int  argc,
const char *const *  argv,
int &  argpos,
QString &  opt,
QByteArray &  val 
)
private

Internal use.

Pull next key/value pair from argv.

Definition at line 1356 of file mythcommandlineparser.cpp.

Referenced by Parse().

◆ ReconcileLinks()

bool MythCommandLineParser::ReconcileLinks ( void  )
private

Replace dummy arguments used to define interdependency with pointers to their real counterparts.

Definition at line 1656 of file mythcommandlineparser.cpp.

Referenced by Parse().

Member Data Documentation

◆ TestCommandLineParser

friend MythCommandLineParser::TestCommandLineParser

Definition at line 118 of file mythcommandlineparser.h.

◆ m_appname

QString MythCommandLineParser::m_appname
private

Definition at line 309 of file mythcommandlineparser.h.

Referenced by GetHelpString().

◆ m_optionedArgs

QMap<QString,CommandLineArg*> MythCommandLineParser::m_optionedArgs
private

Definition at line 310 of file mythcommandlineparser.h.

Referenced by add(), GetHelpString(), Parse(), and ~MythCommandLineParser().

◆ m_namedArgs

QMap<QString,CommandLineArg*> MythCommandLineParser::m_namedArgs
private

◆ m_passthroughActive

bool MythCommandLineParser::m_passthroughActive {false}
private

Definition at line 312 of file mythcommandlineparser.h.

Referenced by getOpt(), and Parse().

◆ m_overridesImported

bool MythCommandLineParser::m_overridesImported {false}
private

Definition at line 313 of file mythcommandlineparser.h.

Referenced by GetSettingsOverride().

◆ m_verbose

bool MythCommandLineParser::m_verbose {false}
private

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