Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
CTraitedSetting< TValue, TSettingType > Class Template Reference

#include <Setting.h>

Inheritance diagram for CTraitedSetting< TValue, TSettingType >:
CSetting ISetting ISettingCallback

Public Types

typedef TValue Value
 

Public Member Functions

SettingType GetType () const override
 
- Public Member Functions inherited from CSetting
 CSetting (const std::string &id, CSettingsManager *settingsManager=nullptr)
 
 CSetting (const std::string &id, const CSetting &setting)
 
 ~CSetting () override=default
 
virtual std::shared_ptr< CSettingClone (const std::string &id) const =0
 
bool Deserialize (const TiXmlNode *node, bool update=false) override
 Deserializes the given XML node into the properties of the setting object. More...
 
virtual bool FromString (const std::string &value)=0
 
virtual std::string ToString () const =0
 
virtual bool Equals (const std::string &value) const =0
 
virtual bool CheckValidity (const std::string &value) const =0
 
virtual void Reset ()=0
 
bool IsEnabled () const
 
void SetEnabled (bool enabled)
 
bool IsDefault () const
 
const std::string & GetParent () const
 
void SetParent (const std::string &parentSetting)
 
SettingLevel GetLevel () const
 
void SetLevel (SettingLevel level)
 
std::shared_ptr< const ISettingControlGetControl () const
 
std::shared_ptr< ISettingControlGetControl ()
 
void SetControl (std::shared_ptr< ISettingControl > control)
 
const SettingDependenciesGetDependencies () const
 
void SetDependencies (const SettingDependencies &dependencies)
 
const std::set< CSettingUpdate > & GetUpdates () const
 
void SetCallback (ISettingCallback *callback)
 
bool IsVisible () const override
 Whether the setting object is visible or hidden. More...
 
void OnSettingAction (std::shared_ptr< const CSetting > setting) override
 The given setting has been activated. More...
 
- Public Member Functions inherited from ISetting
 ISetting (const std::string &id, CSettingsManager *settingsManager=nullptr)
 Creates a new setting object with the given identifier. More...
 
virtual ~ISetting ()=default
 
const std::string & GetId () const
 Gets the identifier of the setting object. More...
 
virtual void SetVisible (bool visible)
 Sets the visibility state of the setting object. More...
 
int GetLabel () const
 Gets the localizeable label ID of the setting group. More...
 
void SetLabel (int label)
 Sets the localizeable label ID of the setting group. More...
 
int GetHelp () const
 Gets the localizeable help ID of the setting group. More...
 
void SetHelp (int help)
 Sets the localizeable help ID of the setting group. More...
 
virtual bool MeetsRequirements () const
 Whether the setting object meets all necessary requirements. More...
 
virtual void CheckRequirements ()
 Checks if the setting object meets all necessary requirements. More...
 
virtual void SetRequirementsMet (bool requirementsMet)
 Sets whether the setting object meets all necessary requirements. More...
 

Static Public Member Functions

static SettingType Type ()
 
- Static Public Member Functions inherited from ISetting
static bool DeserializeIdentification (const TiXmlNode *node, std::string &identification)
 Deserializes the given XML node to retrieve a setting object's identifier. More...
 

Protected Member Functions

 CTraitedSetting (const std::string &id, CSettingsManager *settingsManager=nullptr)
 
 CTraitedSetting (const std::string &id, const CTraitedSetting &setting)
 
 ~CTraitedSetting () override=default
 
- Protected Member Functions inherited from CSetting
bool OnSettingChanging (std::shared_ptr< const CSetting > setting) override
 The value of the given setting is being changed. More...
 
void OnSettingChanged (std::shared_ptr< const CSetting > setting) override
 The value of the given setting has changed. More...
 
bool OnSettingUpdate (std::shared_ptr< CSetting > setting, const char *oldSettingId, const TiXmlNode *oldSettingNode) override
 The given setting needs to be updated. More...
 
void OnSettingPropertyChanged (std::shared_ptr< const CSetting > setting, const char *propertyName) override
 The given property of the given setting has changed. More...
 
void Copy (const CSetting &setting)
 
template<class TSetting >
std::shared_ptr< TSetting > shared_from_base ()
 
- Protected Member Functions inherited from ISettingCallback
virtual ~ISettingCallback ()=default
 

Additional Inherited Members

- Protected Attributes inherited from CSetting
ISettingCallbackm_callback = nullptr
 
bool m_enabled = true
 
std::string m_parentSetting
 
SettingLevel m_level = SettingLevel::Standard
 
std::shared_ptr< ISettingControlm_control
 
SettingDependencies m_dependencies
 
std::set< CSettingUpdatem_updates
 
bool m_changed = false
 
CSharedSection m_critical
 
- Protected Attributes inherited from ISetting
std::string m_id
 
CSettingsManagerm_settingsManager
 

Member Typedef Documentation

◆ Value

template<typename TValue , SettingType TSettingType>
typedef TValue CTraitedSetting< TValue, TSettingType >::Value

Constructor & Destructor Documentation

◆ CTraitedSetting() [1/2]

template<typename TValue , SettingType TSettingType>
CTraitedSetting< TValue, TSettingType >::CTraitedSetting ( const std::string &  id,
CSettingsManager settingsManager = nullptr 
)
inlineprotected

◆ CTraitedSetting() [2/2]

template<typename TValue , SettingType TSettingType>
CTraitedSetting< TValue, TSettingType >::CTraitedSetting ( const std::string &  id,
const CTraitedSetting< TValue, TSettingType > &  setting 
)
inlineprotected

◆ ~CTraitedSetting()

template<typename TValue , SettingType TSettingType>
CTraitedSetting< TValue, TSettingType >::~CTraitedSetting ( )
overrideprotecteddefault

Member Function Documentation

◆ GetType()

template<typename TValue , SettingType TSettingType>
SettingType CTraitedSetting< TValue, TSettingType >::GetType ( ) const
inlineoverridevirtual

Implements CSetting.

◆ Type()

template<typename TValue , SettingType TSettingType>
static SettingType CTraitedSetting< TValue, TSettingType >::Type ( )
inlinestatic

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