neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neolib::i_settings Class Referenceabstract

#include <i_settings.hpp>

Inheritance diagram for neolib::i_settings:
neolib::i_reference_counted neolib::reference_counted< i_settings > neolib::settings

Classes

struct  category_not_found
 
struct  group_not_found
 
struct  setting_already_registered
 
struct  setting_not_found
 

Public Types

typedef i_settings abstract_type
 

Public Member Functions

 declare_event (setting_changing, const i_setting &) declare_event(setting_changed
 
const i_settingdeclare_event (setting_deleted, const i_setting &) declare_event(settings_changed
 
virtual void register_category (i_string const &aCategorySubkey, i_string const &aCategoryTitle=string{})=0
 
virtual void register_group (i_string const &aGroupSubkey, i_string const &aGroupTitle=string{})=0
 
virtual void register_setting (i_setting &aSetting)=0
 
virtual i_map< i_string, i_string > constall_categories () const =0
 
virtual i_string constcategory_title (i_string const &aCategorySubkey) const =0
 
virtual i_map< i_string, i_map< i_string, i_string > > constall_groups () const =0
 
virtual i_string constgroup_title (i_string const &aGroupSubkey) const =0
 
virtual i_map< i_string, i_ref_ptr< i_setting > > constall_settings () const =0
 
virtual i_vector< i_ref_ptr< i_setting > > constall_settings_ordered () const =0
 
virtual i_setting constsetting (i_string const &aKey) const =0
 
virtual i_settingsetting (i_string const &aKey)=0
 
virtual void change_setting (i_setting &aExistingSetting, i_setting_value const &aValue, bool aApplyNow=true)=0
 
virtual void delete_setting (i_setting &aExistingSetting)=0
 
virtual void apply_changes ()=0
 
virtual void discard_changes ()=0
 
virtual bool modified () const =0
 
virtual void register_friendly_text (i_setting const &aSetting, i_string const &aText, i_string const &aFriendlyText)=0
 
virtual i_string constfriendly_text (i_setting const &aSetting, i_string const &aText) const =0
 
virtual void load ()=0
 
virtual void save () const =0
 
virtual void changing_setting (i_setting const &aSetting)=0
 
virtual void changed_setting (i_setting const &aSetting)=0
 
void register_category (string const &aCategorySubkey, string const &aCategoryTitle=string{})
 
void register_group (string const &aGroupSubkey, string const &aGroupTitle=string{})
 
template<typename T >
i_settingregister_setting (string const &aKey, T const &aDefaultValue, setting_constraints< as_setting_t< T > > const &aSettingConstraints, string const &aFormat={})
 
template<typename T >
i_settingregister_setting (string const &aKey, T const &aDefaultValue, string const &aFormat={})
 
template<typename T >
void change_setting (i_setting &aExistingSetting, T const &aValue, bool aApplyNow=true)
 
- Public Member Functions inherited from neolib::i_reference_counted
virtual ~i_reference_counted ()=default
 
virtual void add_ref () const noexcept=0
 
virtual void release () const =0
 
virtual int32_t use_count () const noexcept=0
 
virtual const i_reference_countedrelease_and_take_ownership () const =0
 
virtual i_reference_countedrelease_and_take_ownership ()=0
 
virtual void pin () const noexcept=0
 
virtual void unpin () const =0
 
virtual i_ref_control_blockcontrol_block ()=0
 

Static Public Member Functions

static uuid constiid ()
 

Detailed Description

Definition at line 63 of file i_settings.hpp.

Member Typedef Documentation

◆ abstract_type

Member Function Documentation

◆ all_categories()

virtual i_map< i_string, i_string > const & neolib::i_settings::all_categories ( ) const
pure virtual

Implemented in neolib::settings.

◆ all_groups()

virtual i_map< i_string, i_map< i_string, i_string > > const & neolib::i_settings::all_groups ( ) const
pure virtual

Implemented in neolib::settings.

◆ all_settings()

virtual i_map< i_string, i_ref_ptr< i_setting > > const & neolib::i_settings::all_settings ( ) const
pure virtual

Implemented in neolib::settings.

◆ all_settings_ordered()

virtual i_vector< i_ref_ptr< i_setting > > const & neolib::i_settings::all_settings_ordered ( ) const
pure virtual

Implemented in neolib::settings.

◆ apply_changes()

virtual void neolib::i_settings::apply_changes ( )
pure virtual

Implemented in neolib::settings.

◆ category_title()

virtual i_string const & neolib::i_settings::category_title ( i_string const aCategorySubkey) const
pure virtual

Implemented in neolib::settings.

◆ change_setting() [1/2]

virtual void neolib::i_settings::change_setting ( i_setting aExistingSetting,
i_setting_value const aValue,
bool  aApplyNow = true 
)
pure virtual

Implemented in neolib::settings.

◆ change_setting() [2/2]

template<typename T >
void neolib::i_settings::change_setting ( i_setting aExistingSetting,
T const aValue,
bool  aApplyNow = true 
)
inline

Definition at line 128 of file i_settings.hpp.

◆ changed_setting()

virtual void neolib::i_settings::changed_setting ( i_setting const aSetting)
pure virtual

Implemented in neolib::settings.

◆ changing_setting()

virtual void neolib::i_settings::changing_setting ( i_setting const aSetting)
pure virtual

Implemented in neolib::settings.

◆ declare_event() [1/2]

neolib::i_settings::declare_event ( setting_changing  ,
const i_setting  
)

◆ declare_event() [2/2]

const i_setting & neolib::i_settings::declare_event ( setting_deleted  ,
const i_setting  
)

◆ delete_setting()

virtual void neolib::i_settings::delete_setting ( i_setting aExistingSetting)
pure virtual

Implemented in neolib::settings.

◆ discard_changes()

virtual void neolib::i_settings::discard_changes ( )
pure virtual

Implemented in neolib::settings.

◆ friendly_text()

virtual i_string const & neolib::i_settings::friendly_text ( i_setting const aSetting,
i_string const aText 
) const
pure virtual

Implemented in neolib::settings.

◆ group_title()

virtual i_string const & neolib::i_settings::group_title ( i_string const aGroupSubkey) const
pure virtual

Implemented in neolib::settings.

◆ iid()

static uuid const & neolib::i_settings::iid ( )
inlinestatic

Definition at line 104 of file i_settings.hpp.

◆ load()

virtual void neolib::i_settings::load ( )
pure virtual

Implemented in neolib::settings.

◆ modified()

virtual bool neolib::i_settings::modified ( ) const
pure virtual

Implemented in neolib::settings.

◆ register_category() [1/2]

virtual void neolib::i_settings::register_category ( i_string const aCategorySubkey,
i_string const aCategoryTitle = string{} 
)
pure virtual

Implemented in neolib::settings, and neolib::settings.

◆ register_category() [2/2]

void neolib::i_settings::register_category ( string const aCategorySubkey,
string const aCategoryTitle = string{} 
)
inline

Definition at line 107 of file i_settings.hpp.

◆ register_friendly_text()

virtual void neolib::i_settings::register_friendly_text ( i_setting const aSetting,
i_string const aText,
i_string const aFriendlyText 
)
pure virtual

Implemented in neolib::settings.

◆ register_group() [1/2]

virtual void neolib::i_settings::register_group ( i_string const aGroupSubkey,
i_string const aGroupTitle = string{} 
)
pure virtual

Implemented in neolib::settings, and neolib::settings.

◆ register_group() [2/2]

void neolib::i_settings::register_group ( string const aGroupSubkey,
string const aGroupTitle = string{} 
)
inline

Definition at line 111 of file i_settings.hpp.

◆ register_setting() [1/3]

virtual void neolib::i_settings::register_setting ( i_setting aSetting)
pure virtual

Implemented in neolib::settings, and neolib::settings.

◆ register_setting() [2/3]

template<typename T >
i_setting & neolib::i_settings::register_setting ( string const aKey,
T const aDefaultValue,
setting_constraints< as_setting_t< T > > const aSettingConstraints,
string const aFormat = {} 
)
inline

Definition at line 116 of file i_settings.hpp.

◆ register_setting() [3/3]

template<typename T >
i_setting & neolib::i_settings::register_setting ( string const aKey,
T const aDefaultValue,
string const aFormat = {} 
)
inline

Definition at line 123 of file i_settings.hpp.

◆ save()

virtual void neolib::i_settings::save ( ) const
pure virtual

Implemented in neolib::settings.

◆ setting() [1/2]

virtual i_setting const & neolib::i_settings::setting ( i_string const aKey) const
pure virtual

Implemented in neolib::settings.

◆ setting() [2/2]

virtual i_setting & neolib::i_settings::setting ( i_string const aKey)
pure virtual

Implemented in neolib::settings.


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