Audacity 3.2.0
Classes | Public Member Functions | Private Attributes | List of all members
StickySetting< SettingType > Class Template Referencefinal

#include <Prefs.h>

Collaboration diagram for StickySetting< SettingType >:
[legend]

Classes

class  ResetHandler
 

Public Member Functions

template<typename... Args>
 StickySetting (Args &&...args)
 
 ~StickySetting ()=default
 
 StickySetting (const StickySetting &)=delete
 
StickySettingoperator= (const StickySetting &)=delete
 
 StickySetting (StickySetting &&)=delete
 
StringSettingoperator= (StickySetting &&)=delete
 
SettingType & Get () noexcept
 
const SettingType & Get () const noexcept
 
SettingType * operator-> () noexcept
 
const SettingType * operator-> () const noexcept
 
SettingType & operator* () noexcept
 
const SettingType & operator* () const noexcept
 

Private Attributes

SettingType mSetting
 
PreferencesResetHandler::Registration< ResetHandlermResetHandlerRegistration
 

Detailed Description

template<typename SettingType>
class StickySetting< SettingType >

Setting that survives preferences reset Currently it's only possible to define sticky setting in a global scope

Template Parameters
SettingType- underlying setting type

Definition at line 589 of file Prefs.h.

Constructor & Destructor Documentation

◆ StickySetting() [1/3]

template<typename SettingType >
template<typename... Args>
StickySetting< SettingType >::StickySetting ( Args &&...  args)
inline

Definition at line 629 of file Prefs.h.

630 : mSetting(std::forward<Args>(args)...)
632 { }
SettingType mSetting
Definition: Prefs.h:625
PreferencesResetHandler::Registration< ResetHandler > mResetHandlerRegistration
Definition: Prefs.h:626

◆ ~StickySetting()

template<typename SettingType >
StickySetting< SettingType >::~StickySetting ( )
default

◆ StickySetting() [2/3]

template<typename SettingType >
StickySetting< SettingType >::StickySetting ( const StickySetting< SettingType > &  )
delete

◆ StickySetting() [3/3]

template<typename SettingType >
StickySetting< SettingType >::StickySetting ( StickySetting< SettingType > &&  )
delete

Member Function Documentation

◆ Get() [1/2]

template<typename SettingType >
const SettingType & StickySetting< SettingType >::Get ( ) const
inlinenoexcept

Definition at line 641 of file Prefs.h.

641{ return mSetting; }

◆ Get() [2/2]

template<typename SettingType >
SettingType & StickySetting< SettingType >::Get ( )
inlinenoexcept

Definition at line 640 of file Prefs.h.

640{ return mSetting; }

◆ operator*() [1/2]

template<typename SettingType >
const SettingType & StickySetting< SettingType >::operator* ( ) const
inlinenoexcept

Definition at line 647 of file Prefs.h.

647{ return mSetting; }

◆ operator*() [2/2]

template<typename SettingType >
SettingType & StickySetting< SettingType >::operator* ( )
inlinenoexcept

Definition at line 646 of file Prefs.h.

646{ return mSetting; }

◆ operator->() [1/2]

template<typename SettingType >
const SettingType * StickySetting< SettingType >::operator-> ( ) const
inlinenoexcept

Definition at line 644 of file Prefs.h.

644{ return &mSetting; }

◆ operator->() [2/2]

template<typename SettingType >
SettingType * StickySetting< SettingType >::operator-> ( )
inlinenoexcept

Definition at line 643 of file Prefs.h.

643{ return &mSetting; }

◆ operator=() [1/2]

template<typename SettingType >
StickySetting & StickySetting< SettingType >::operator= ( const StickySetting< SettingType > &  )
delete

◆ operator=() [2/2]

template<typename SettingType >
StringSetting & StickySetting< SettingType >::operator= ( StickySetting< SettingType > &&  )
delete

Member Data Documentation

◆ mResetHandlerRegistration

template<typename SettingType >
PreferencesResetHandler::Registration<ResetHandler> StickySetting< SettingType >::mResetHandlerRegistration
private

Definition at line 626 of file Prefs.h.

◆ mSetting

template<typename SettingType >
SettingType StickySetting< SettingType >::mSetting
private

Definition at line 625 of file Prefs.h.


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