|
swift
|
Base class for traits to be used as template argument to swift::misc::CSetting. More...
#include <settingscache.h>
Public Types | |
| using | type = T |
| Data type of the value. | |
Public Member Functions | |
| TSettingTrait ()=delete | |
| Deleted default constructor. | |
| TSettingTrait (const TSettingTrait &)=delete | |
| Deleted copy constructor. | |
| TSettingTrait & | operator= (const TSettingTrait &)=delete |
| Deleted copy assignment operator. | |
Static Public Member Functions | |
| static const char * | key () |
| Key string of the value. Reimplemented in derived class. | |
| static const QString & | humanReadable () |
| Optional human readable name. | |
| static bool | isValid (const T &value, QString &reason) |
| Validator function. Return true if the argument is valid, false otherwise. Default implementation just returns true. Reimplemented in derived class to support validation of the value. | |
| static const T & | defaultValue () |
| Return the value to use in case the supplied value does not satisfy the validator. Default implementation returns a default-constructed value. | |
Base class for traits to be used as template argument to swift::misc::CSetting.
Definition at line 133 of file settingscache.h.
| using swift::misc::TSettingTrait< T >::type = T |
Data type of the value.
Definition at line 136 of file settingscache.h.
|
inlinestatic |
Return the value to use in case the supplied value does not satisfy the validator. Default implementation returns a default-constructed value.
Definition at line 163 of file settingscache.h.
|
inlinestatic |
Optional human readable name.
Definition at line 146 of file settingscache.h.
|
inlinestatic |
Validator function. Return true if the argument is valid, false otherwise. Default implementation just returns true. Reimplemented in derived class to support validation of the value.
Definition at line 154 of file settingscache.h.
|
inlinestatic |
Key string of the value. Reimplemented in derived class.
Definition at line 139 of file settingscache.h.