MythTV  master
Public Member Functions | Static Public Member Functions | 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 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)
 Helper utility for logging interface to return syslog facility. More...
 
LogLevel_t GetLogLevel (void)
 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", unsigned int progress=0)
 Read in logging options and initialize the logging interface. More...
 
void ApplySettingsOverride (void)
 Apply all overrides to the global context. More...
 
int Daemonize (void)
 Fork application into background, and detatch from terminal. More...
 

Static Public Member Functions

static void PrintVersion (void)
 Print application version information. More...
 

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...
 

Private Member Functions

int 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 114 of file mythcommandlineparser.h.

Constructor & Destructor Documentation

◆ MythCommandLineParser()

MythCommandLineParser::MythCommandLineParser ( QString  appname)
explicit

Default constructor for MythCommandLineArg class.

Definition at line 1159 of file mythcommandlineparser.cpp.

◆ ~MythCommandLineParser()

MythCommandLineParser::~MythCommandLineParser ( )

Definition at line 1172 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 1261 of file mythcommandlineparser.cpp.

Referenced by main().

◆ PrintHelp()

void MythCommandLineParser::PrintHelp ( void  ) const

Print command line option help.

Definition at line 1277 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 1288 of file mythcommandlineparser.cpp.

Referenced by PrintHelp().

◆ GetHelpHeader()

virtual QString MythCommandLineParser::GetHelpHeader ( void  ) const
inlinevirtual

◆ 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 1434 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 135 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 140 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 145 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 150 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 155 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 160 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 165 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 170 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 175 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 180 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 187 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 192 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 197 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 202 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 207 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 212 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 217 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 222 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 227 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 232 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 1225 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 1812 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 1831 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 1839 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 1846 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 1858 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 2475 of file mythcommandlineparser.cpp.

Referenced by ConfigureLogging(), and main().

◆ GetSyslogFacility()

int MythCommandLineParser::GetSyslogFacility ( void  )

Helper utility for logging interface to return syslog facility.

Definition at line 2509 of file mythcommandlineparser.cpp.

Referenced by ConfigureLogging().

◆ GetLogLevel()

LogLevel_t MythCommandLineParser::GetLogLevel ( void  )

Helper utility for logging interface to filtering level.

Definition at line 2520 of file mythcommandlineparser.cpp.

Referenced by ConfigureLogging().

◆ GetAppName()

QString MythCommandLineParser::GetAppName ( void  ) const
inline

Definition at line 248 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(), 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 1963 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 1988 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 2013 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 2038 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 2063 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 2117 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 2147 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 2180 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 2538 of file mythcommandlineparser.cpp.

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

◆ ConfigureLogging()

int MythCommandLineParser::ConfigureLogging ( const QString &  mask = "general",
unsigned int  progress = 0 
)

Read in logging options and initialize the logging interface.

Definition at line 2561 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 2628 of file mythcommandlineparser.cpp.

Referenced by main().

◆ Daemonize()

int MythCommandLineParser::Daemonize ( void  )

Fork application into background, and detatch from terminal.

Definition at line 2734 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 2205 of file mythcommandlineparser.cpp.

Referenced by MythAVTestCommandLineParser::LoadArguments(), MythFileRecorderCommandLineParser::LoadArguments(), and MythExternRecorderCommandLineParser::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 2222 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 2241 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 2281 of file mythcommandlineparser.cpp.

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

◆ addMouse()

void MythCommandLineParser::addMouse ( void  )
protected

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

Definition at line 2296 of file mythcommandlineparser.cpp.

Referenced by MythFrontendCommandLineParser::LoadArguments(), MythTVSetupCommandLineParser::LoadArguments(), and MythScreenWizardCommandLineParser::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 2370 of file mythcommandlineparser.cpp.

Referenced by MythFrontendCommandLineParser::LoadArguments(), and MythBackendCommandLineParser::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 2466 of file mythcommandlineparser.cpp.

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

◆ getOpt()

int 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 1353 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 1655 of file mythcommandlineparser.cpp.

Referenced by Parse().

Member Data Documentation

◆ m_appname

QString MythCommandLineParser::m_appname
private

Definition at line 293 of file mythcommandlineparser.h.

Referenced by GetHelpString().

◆ m_optionedArgs

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

Definition at line 294 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 296 of file mythcommandlineparser.h.

Referenced by getOpt(), and Parse().

◆ m_overridesImported

bool MythCommandLineParser::m_overridesImported {false}
private

Definition at line 297 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: