neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neolib::setting< T > Class Template Reference

#include <setting.hpp>

Inheritance diagram for neolib::setting< T >:
neolib::reference_counted< i_setting > neolib::i_setting neolib::i_reference_counted

Public Types

typedef T value_type
 
typedef setting_value< Tsetting_value_type
 
- Public Types inherited from neolib::i_setting
typedef i_setting abstract_type
 

Public Member Functions

 define_declared_event (Changing, changing) define_declared_event(Changed
 
 setting (i_settings &aManager, i_string const &aKey, T const &aDefaultValue, i_setting_constraints const &aConstraints=setting_constraints< T >{}, i_string const &aFormat=string{})
 
 setting (const self_type &aOther)
 
 setting (const i_setting &aSetting)
 
i_settingsmanager () const override
 
string constkey () const override
 
setting_constraints< T > constconstraints () const override
 
string constformat () const override
 
bool hidden () const override
 
bool is_enabled () const override
 
void set_enabled (bool aEnabled) override
 
bool is_default (bool aUnappliedNew=false) const override
 
bool modified () const override
 
i_setting_value constdefault_value () const override
 
i_setting_value constvalue (bool aUnappliedNew=false) const override
 
i_setting_value constmodified_value () const override
 
void value_as_string (i_string &aValue, bool aUnappliedNew=false) const override
 
void set_default_value (i_setting_value const &aDefaultValue) override
 
void set_value (i_setting_value const &aNewValue) override
 
void set_value_from_string (i_string const &aNewValue) override
 
void clear () override
 
virtual i_setting_value constvalue (bool aUnappliedNew=false) const=0
 
template<typename T >
abstract_return_t< const Tvalue (bool aUnappliedNew=false) const
 
virtual i_setting_value constmodified_value () const=0
 
template<typename T >
abstract_return_t< const Tmodified_value () const
 
virtual void value_as_string (i_string &aValue, bool aUnappliedNew=false) const=0
 
std::string value_as_string (bool aUnappliedNew=false) const
 
virtual void set_default_value (i_setting_value const &aDefaultValue)=0
 
template<typename T >
void set_default_value (T const &aDefaultValue, std::enable_if_t<!std::is_convertible_v< T &, i_setting_value & >, sfinae >={})
 
virtual void set_value (i_setting_value const &aNewValue)=0
 
template<typename T >
void set_value (T const &aNewValue, std::enable_if_t<!std::is_convertible_v< T &, i_setting_value & >, sfinae >={})
 
- Public Member Functions inherited from neolib::reference_counted< i_setting >
 reference_counted () noexcept
 
 reference_counted (const reference_counted &aOther) noexcept
 
 ~reference_counted ()
 
reference_countedoperator= (const reference_counted &)
 
void add_ref () const noexcept override
 
void release () const override
 
int32_t use_count () const noexcept override
 
const base_typerelease_and_take_ownership () const override
 
base_typerelease_and_take_ownership () override
 
void pin () const noexcept override
 
void unpin () const override
 
i_ref_control_blockcontrol_block () override
 
- Public Member Functions inherited from neolib::i_setting
bool enabled () const
 
bool disabled () const
 
void enable ()
 
void disabled ()
 
template<typename T >
abstract_return_t< const Tvalue (bool aUnappliedNew=false) const
 
template<typename T >
abstract_return_t< const Tmodified_value () const
 
std::string value_as_string (bool aUnappliedNew=false) const
 
template<typename T >
void set_default_value (T const &aDefaultValue, std::enable_if_t<!std::is_convertible_v< T &, i_setting_value & >, sfinae >={})
 
template<typename T >
void set_value (T const &aNewValue, std::enable_if_t<!std::is_convertible_v< T &, i_setting_value & >, sfinae >={})
 
template<typename T >
void apply_value (T const &aNewValue, std::enable_if_t<!std::is_convertible_v< T &, i_setting_value & >, sfinae >={})
 
i_settingoperator= (i_setting const &aRhs)
 
i_settingoperator= (i_setting_value const &aRhs)
 
template<typename T >
i_settingoperator= (T const &aNewValue)
 
- Public Member Functions inherited from neolib::i_reference_counted
virtual ~i_reference_counted ()=default
 

Protected Member Functions

i_setting_valuetemp_setting_value () override
 

Friends

class settings
 

Detailed Description

template<typename T>
class neolib::setting< T >

Definition at line 51 of file setting.hpp.

Member Typedef Documentation

◆ setting_value_type

template<typename T >
typedef setting_value<T> neolib::setting< T >::setting_value_type

Definition at line 58 of file setting.hpp.

◆ value_type

template<typename T >
typedef T neolib::setting< T >::value_type

Definition at line 57 of file setting.hpp.

Constructor & Destructor Documentation

◆ setting() [1/3]

template<typename T >
neolib::setting< T >::setting ( i_settings aManager,
i_string const aKey,
T const aDefaultValue,
i_setting_constraints const aConstraints = setting_constraints<T>{},
i_string const aFormat = string{} 
)
inline

Definition at line 63 of file setting.hpp.

◆ setting() [2/3]

template<typename T >
neolib::setting< T >::setting ( const self_type &  aOther)
inline

Definition at line 72 of file setting.hpp.

◆ setting() [3/3]

template<typename T >
neolib::setting< T >::setting ( const i_setting< T > &  aSetting)
inline

Definition at line 83 of file setting.hpp.

Member Function Documentation

◆ clear()

template<typename T >
void neolib::setting< T >::clear ( )
inlineoverridevirtual

Implements neolib::i_setting.

Definition at line 201 of file setting.hpp.

◆ constraints()

template<typename T >
setting_constraints< T > const & neolib::setting< T >::constraints ( ) const
inlineoverridevirtual

Implements neolib::i_setting.

Definition at line 101 of file setting.hpp.

◆ default_value()

template<typename T >
i_setting_value const & neolib::setting< T >::default_value ( ) const
inlineoverridevirtual

Implements neolib::i_setting.

Definition at line 136 of file setting.hpp.

◆ define_declared_event()

template<typename T >
neolib::setting< T >::define_declared_event ( Changing  ,
changing   
)

◆ format()

template<typename T >
string const & neolib::setting< T >::format ( ) const
inlineoverridevirtual

Implements neolib::i_setting.

Definition at line 105 of file setting.hpp.

◆ hidden()

template<typename T >
bool neolib::setting< T >::hidden ( ) const
inlineoverridevirtual

Implements neolib::i_setting.

Definition at line 109 of file setting.hpp.

◆ is_default()

template<typename T >
bool neolib::setting< T >::is_default ( bool  aUnappliedNew = false) const
inlineoverridevirtual

Implements neolib::i_setting.

Definition at line 126 of file setting.hpp.

◆ is_enabled()

template<typename T >
bool neolib::setting< T >::is_enabled ( ) const
inlineoverridevirtual

Implements neolib::i_setting.

Definition at line 113 of file setting.hpp.

◆ key()

template<typename T >
string const & neolib::setting< T >::key ( ) const
inlineoverridevirtual

Implements neolib::i_setting.

Definition at line 97 of file setting.hpp.

◆ manager()

template<typename T >
i_settings & neolib::setting< T >::manager ( ) const
inlineoverride

Definition at line 93 of file setting.hpp.

◆ modified()

template<typename T >
bool neolib::setting< T >::modified ( ) const
inlineoverridevirtual

Implements neolib::i_setting.

Definition at line 132 of file setting.hpp.

◆ modified_value() [1/3]

template<typename T >
template<typename T >
abstract_return_t< const T > neolib::i_setting::modified_value ( ) const
inlinevirtual

Implements neolib::i_setting.

Definition at line 108 of file i_setting.hpp.

◆ modified_value() [2/3]

template<typename T >
i_setting_value const & neolib::setting< T >::modified_value ( ) const
inlineoverridevirtual

Implements neolib::i_setting.

Definition at line 154 of file setting.hpp.

◆ modified_value() [3/3]

template<typename T >
virtual i_setting_value const & neolib::i_setting::modified_value ( ) const
virtual

Implements neolib::i_setting.

◆ set_default_value() [1/3]

template<typename T >
void neolib::setting< T >::set_default_value ( i_setting_value const aDefaultValue)
inlineoverridevirtual

Implements neolib::i_setting.

Definition at line 166 of file setting.hpp.

◆ set_default_value() [2/3]

template<typename T >
virtual void neolib::i_setting::set_default_value ( i_setting_value const aDefaultValue)
virtual

Implements neolib::i_setting.

◆ set_default_value() [3/3]

template<typename T >
template<typename T >
void neolib::i_setting::set_default_value ( T const aDefaultValue,
std::enable_if_t<!std::is_convertible_v< T &, i_setting_value & >, sfinae = {} 
)
inline

Definition at line 119 of file i_setting.hpp.

◆ set_enabled()

template<typename T >
void neolib::setting< T >::set_enabled ( bool  aEnabled)
inlineoverridevirtual

Implements neolib::i_setting.

Definition at line 117 of file setting.hpp.

◆ set_value() [1/3]

template<typename T >
void neolib::setting< T >::set_value ( i_setting_value const aNewValue)
inlineoverridevirtual

Implements neolib::i_setting.

Definition at line 179 of file setting.hpp.

◆ set_value() [2/3]

template<typename T >
virtual void neolib::i_setting::set_value ( i_setting_value const aNewValue)
virtual

Implements neolib::i_setting.

◆ set_value() [3/3]

template<typename T >
template<typename T >
void neolib::i_setting::set_value ( T const aNewValue,
std::enable_if_t<!std::is_convertible_v< T &, i_setting_value & >, sfinae = {} 
)
inline

Definition at line 126 of file i_setting.hpp.

◆ set_value_from_string()

template<typename T >
void neolib::setting< T >::set_value_from_string ( i_string const aNewValue)
inlineoverridevirtual

Implements neolib::i_setting.

Definition at line 197 of file setting.hpp.

◆ temp_setting_value()

template<typename T >
i_setting_value & neolib::setting< T >::temp_setting_value ( )
inlineoverrideprotectedvirtual

Implements neolib::i_setting.

Definition at line 218 of file setting.hpp.

◆ value() [1/3]

template<typename T >
template<typename T >
abstract_return_t< const T > neolib::i_setting::value ( bool  aUnappliedNew = false) const
inlinevirtual

Implements neolib::i_setting.

Definition at line 103 of file i_setting.hpp.

◆ value() [2/3]

template<typename T >
i_setting_value const & neolib::setting< T >::value ( bool  aUnappliedNew = false) const
inlineoverridevirtual

Implements neolib::i_setting.

Definition at line 141 of file setting.hpp.

◆ value() [3/3]

template<typename T >
virtual i_setting_value const & neolib::i_setting::value ( bool  aUnappliedNew = false) const
virtual

Implements neolib::i_setting.

◆ value_as_string() [1/3]

template<typename T >
std::string neolib::i_setting::value_as_string ( bool  aUnappliedNew = false) const
inline

Definition at line 112 of file i_setting.hpp.

◆ value_as_string() [2/3]

template<typename T >
void neolib::setting< T >::value_as_string ( i_string aValue,
bool  aUnappliedNew = false 
) const
inlineoverridevirtual

Implements neolib::i_setting.

Definition at line 161 of file setting.hpp.

◆ value_as_string() [3/3]

template<typename T >
virtual void neolib::i_setting::value_as_string ( i_string aValue,
bool  aUnappliedNew = false 
) const
virtual

Implements neolib::i_setting.

Friends And Related Symbol Documentation

◆ settings

template<typename T >
friend class settings
friend

Definition at line 53 of file setting.hpp.


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