swift
Public Types | Public Member Functions | Static Public Member Functions | List of all members
swift::misc::TSettingTrait< T > Struct Template Reference

Base class for traits to be used as template argument to swift::misc::CSetting. More...

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.
 
TSettingTraitoperator= (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.
 

Detailed Description

template<typename T>
struct swift::misc::TSettingTrait< T >

Base class for traits to be used as template argument to swift::misc::CSetting.

Definition at line 133 of file settingscache.h.


The documentation for this struct was generated from the following file: