QuasarAppLib
|
The OptionData class contains information about one option. More...
#include <optiondata.h>
Public Member Functions | |
OptionData (const QStringList &names, const QString &arguments="", const QString &description="", const QString &example="", const QString &depricatedMsg="", bool removed=false) | |
OptionData This is main constructor. | |
const QStringList & | names () const |
name This is name of the option. It is a required argument and cannot be empty. | |
const QString & | description () const |
description This is description message of this option. | |
const QString & | example () const |
example This is example of use string. | |
const QString & | arguments () const |
arguments This is input arguments of this option or help meesage about arguments. | |
const QString & | depricatedMsg () const |
depricatedWarning This is a message that will be printed as a warning if user will use this option. If you set this argument to empty value then warning message will be ignored and option not be marked asa a depricated. An option will be marked as a depricated when this arguments will not equal empty string. | |
Help::Options | toHelp () const |
toHelp This method convert this option into help line. The help line have next structure : | |
bool | isValid () const |
isValid This method return true if the option is valid. If option do not contain a name then it is invalid. | |
bool | isRemoved () const |
isRemoved This method return true if the option is removed. | |
bool | isDepricated () const |
isDepricated This method return true if this option is depricated. | |
Protected Member Functions | |
void | setNames (const QStringList &newNames) |
setNames This method sets new value of the option name. | |
void | setDescription (const QString &newDescription) |
setDescription This method sets new description of this options. | |
void | setExample (const QString &newExample) |
setExample This method sets a new example value of this option | |
void | setArguments (const QString &newArguments) |
setArguments This method sets new value of the options arguments | |
void | setDepricatedMsg (const QString &newDepricatedMsg) |
setDepricatedMsg This method sets new value of the depricated warnning message of this option. | |
The OptionData class contains information about one option.
Definition at line 20 of file optiondata.h.
QuasarAppUtils::OptionData::OptionData | ( | const QStringList & | names, |
const QString & | arguments = "" , |
||
const QString & | description = "" , |
||
const QString & | example = "" , |
||
const QString & | depricatedMsg = "" , |
||
bool | removed = false |
||
) |
OptionData This is main constructor.
names | This is names list of the option. It is a required argument and cannot be empty. |
arguments | This is input arguments of this option or help meesage about arguments. |
description | This is description message of this option. |
example | This is example of use string. |
depricatedMsg | This is a message that will be printed as a warning if user will use this option. If you set this argument to empty value then warning message will be ignored and option not be marked asa a depricated. An option will be marked as a depricated when this arguments will not equal empty string. |
removed | This option show depricatedMsg as a error and force the parseParams method return false. This option will be ignored if the depricatedMsg will be empty. |
Definition at line 13 of file optiondata.cpp.
arguments This is input arguments of this option or help meesage about arguments.
Definition at line 52 of file optiondata.cpp.
depricatedWarning This is a message that will be printed as a warning if user will use this option. If you set this argument to empty value then warning message will be ignored and option not be marked asa a depricated. An option will be marked as a depricated when this arguments will not equal empty string.
Definition at line 60 of file optiondata.cpp.
description This is description message of this option.
Definition at line 36 of file optiondata.cpp.
example This is example of use string.
Definition at line 44 of file optiondata.cpp.
bool QuasarAppUtils::OptionData::isDepricated | ( | ) | const |
isDepricated This method return true if this option is depricated.
Definition at line 72 of file optiondata.cpp.
bool QuasarAppUtils::OptionData::isRemoved | ( | ) | const |
isRemoved This method return true if the option is removed.
Definition at line 68 of file optiondata.cpp.
bool QuasarAppUtils::OptionData::isValid | ( | ) | const |
isValid This method return true if the option is valid. If option do not contain a name then it is invalid.
Definition at line 87 of file optiondata.cpp.
const QStringList & QuasarAppUtils::OptionData::names | ( | ) | const |
name This is name of the option. It is a required argument and cannot be empty.
Definition at line 28 of file optiondata.cpp.
setArguments This method sets new value of the options arguments
newArguments | new value of the options arguments |
Definition at line 56 of file optiondata.cpp.
setDepricatedMsg This method sets new value of the depricated warnning message of this option.
newDepricatedMsg | This is new value of the depricated message. |
Definition at line 64 of file optiondata.cpp.
setDescription This method sets new description of this options.
newDescription | This is new value of optons description |
Definition at line 40 of file optiondata.cpp.
setExample This method sets a new example value of this option
newExample | This is a new value of the options example. |
Definition at line 48 of file optiondata.cpp.
|
protected |
setNames This method sets new value of the option name.
newNames | This is a new value of the options name. |
Definition at line 32 of file optiondata.cpp.
Help::Options QuasarAppUtils::OptionData::toHelp | ( | ) | const |
toHelp This method convert this option into help line. The help line have next structure :
Key: {name [arguments]} Value: {description examples}
Definition at line 76 of file optiondata.cpp.