QElectroTech
0.70
|
#include <qetarguments.h>
Public Member Functions | |
QETArguments (QObject *=nullptr) | |
QETArguments (const QList< QString > &, QObject *=nullptr) | |
QETArguments (const QETArguments &) | |
QETArguments & | operator= (const QETArguments &) |
~QETArguments () override | |
virtual void | setArguments (const QList< QString > &) |
virtual QList< QString > | arguments () const |
virtual QList< QString > | files () const |
virtual QList< QString > | projectFiles () const |
virtual QList< QString > | elementFiles () const |
virtual QList< QString > | titleBlockTemplateFiles () const |
virtual bool | langDirSpecified () const |
virtual QString | langDir () const |
virtual bool | printHelpRequested () const |
virtual bool | printLicenseRequested () const |
virtual bool | printVersionRequested () const |
virtual QList< QString > | options () const |
virtual QList< QString > | unknownOptions () const |
Private Member Functions | |
void | clear () |
void | parseArguments (const QList< QString > &) |
void | handleFileArgument (const QString &) |
void | handleOptionArgument (const QString &) |
Private Attributes | |
QList< QString > | project_files_ |
QList< QString > | element_files_ |
QList< QString > | tbt_files_ |
QList< QString > | options_ |
QList< QString > | unknown_options_ |
QString | lang_dir_ |
bool | print_help_ |
bool | print_license_ |
bool | print_version_ |
This class represents a set of arguments the application has received as parameters. Initialized from a list of strings, an instance of this class provides access to the differents options and files given on the command line.
Definition at line 26 of file qetarguments.h.
QETArguments::QETArguments | ( | QObject * | parent = nullptr | ) |
Constructeur par defaut Cree un objet sans argument.
Definition at line 25 of file qetarguments.cpp.
QETArguments::QETArguments | ( | const QList< QString > & | args, |
QObject * | parent = nullptr |
||
) |
Constructeur
args | Arguments a analyser et memoriser |
parent | QObject parent |
Definition at line 38 of file qetarguments.cpp.
References parseArguments().
QETArguments::QETArguments | ( | const QETArguments & | qet_arguments | ) |
Constructeur de copie - la copie reprend le parent de l'original
qet_arguments | Objet a copier |
Definition at line 51 of file qetarguments.cpp.
|
override |
Destructeur
Definition at line 103 of file qetarguments.cpp.
|
virtual |
Definition at line 120 of file qetarguments.cpp.
References element_files_, options_, project_files_, tbt_files_, and unknown_options_.
Referenced by main(), and parseArguments().
|
private |
Oublie tous les arguments de cet objet
Definition at line 170 of file qetarguments.cpp.
References element_files_, options_, project_files_, and unknown_options_.
Referenced by parseArguments().
|
virtual |
Definition at line 142 of file qetarguments.cpp.
References element_files_.
Referenced by QETApp::openFiles().
|
virtual |
Definition at line 128 of file qetarguments.cpp.
References element_files_, project_files_, and tbt_files_.
Referenced by QETApp::QETApp().
|
private |
Gere les arguments correspondant a un fichier existant.
Definition at line 211 of file qetarguments.cpp.
References element_files_, project_files_, tbt_files_, and TITLEBLOCKS_FILE_EXTENSION.
Referenced by parseArguments().
|
private |
Gere les arguments correspondant potentiellement a une option. Les options reconnues sont : –common-elements-dir= –common-tbt-dir –config-dir= –lang-dir= –help –version -v –license
Definition at line 239 of file qetarguments.cpp.
References lang_dir_, options_, print_help_, print_license_, print_version_, and unknown_options_.
Referenced by parseArguments().
|
virtual |
Definition at line 352 of file qetarguments.cpp.
References lang_dir_.
Referenced by QETApp::parseArguments().
|
virtual |
Definition at line 344 of file qetarguments.cpp.
References lang_dir_.
Referenced by QETApp::parseArguments().
QETArguments & QETArguments::operator= | ( | const QETArguments & | qet_arguments | ) |
Operateur d'affectation - la copie ne reprend pas le parent de l'original
qet_arguments | Objet a copier |
Definition at line 78 of file qetarguments.cpp.
References element_files_, lang_dir_, options_, print_help_, print_license_, print_version_, project_files_, tbt_files_, and unknown_options_.
|
virtual |
|
private |
Analyse des arguments et les retient dans cet objet. Si cet objet contenait deja des arguments, ceux-ci sont oublies.
arguments | Arguments a analyser |
Definition at line 191 of file qetarguments.cpp.
References arguments(), clear(), handleFileArgument(), and handleOptionArgument().
Referenced by QETArguments(), and setArguments().
|
virtual |
Definition at line 360 of file qetarguments.cpp.
References print_help_.
Referenced by QETApp::parseArguments().
|
virtual |
Definition at line 368 of file qetarguments.cpp.
References print_license_.
Referenced by QETApp::parseArguments().
|
virtual |
Definition at line 376 of file qetarguments.cpp.
References print_version_.
Referenced by QETApp::parseArguments().
|
virtual |
Definition at line 135 of file qetarguments.cpp.
References project_files_.
Referenced by QETApp::openFiles().
|
virtual |
Definit les arguments de cet objet. Si cet objet contenait deja des arguments, ceux-ci sont oublies.
args | Arguments a analyser et memoriser |
Definition at line 111 of file qetarguments.cpp.
References parseArguments().
|
virtual |
Definition at line 149 of file qetarguments.cpp.
References tbt_files_.
Referenced by QETApp::openFiles().
|
virtual |
Definition at line 163 of file qetarguments.cpp.
References unknown_options_.
|
private |
Definition at line 74 of file qetarguments.h.
Referenced by arguments(), clear(), elementFiles(), files(), handleFileArgument(), and operator=().
|
private |
Definition at line 87 of file qetarguments.h.
Referenced by handleOptionArgument(), langDir(), langDirSpecified(), and operator=().
|
private |
Definition at line 76 of file qetarguments.h.
Referenced by arguments(), clear(), handleOptionArgument(), operator=(), and options().
|
private |
Definition at line 88 of file qetarguments.h.
Referenced by handleOptionArgument(), operator=(), and printHelpRequested().
|
private |
Definition at line 89 of file qetarguments.h.
Referenced by handleOptionArgument(), operator=(), and printLicenseRequested().
|
private |
Definition at line 90 of file qetarguments.h.
Referenced by handleOptionArgument(), operator=(), and printVersionRequested().
|
private |
Definition at line 73 of file qetarguments.h.
Referenced by arguments(), clear(), files(), handleFileArgument(), operator=(), and projectFiles().
|
private |
Definition at line 75 of file qetarguments.h.
Referenced by arguments(), files(), handleFileArgument(), operator=(), and titleBlockTemplateFiles().
|
private |
Definition at line 77 of file qetarguments.h.
Referenced by arguments(), clear(), handleOptionArgument(), operator=(), and unknownOptions().