|
ReXGlue SDK
|
#include <rex/setting.h>
Public Member Functions | |
| const std::string & | GetName () const |
| const std::string & | GetHelp () const |
| SettingType | GetType () const |
| const SettingConstraints & | GetConstraints () const |
| SettingOwner & | GetOwner () const |
| SettingLayer | GetLayer () const |
| bool | IsFrozen () const |
| bool | IsRestartPending () const |
| std::string | GetText () const |
| std::string | GetDefaultText () const |
| Result< void > | Check (std::string_view text) const |
| Result< void > | SetText (SettingLayer layer, std::string_view text) |
| Result< void > | Reset () |
Protected Member Functions | |
| SettingBase (SettingOwner &owner, std::string_view name, SettingType type, std::string_view help) | |
| SettingConstraints & | EditConstraints () |
| Result< void > | SetFromCode (std::string_view text) |
| Protected Member Functions inherited from rex::NonCopyable | |
| NonCopyable (const NonCopyable &)=delete | |
| NonCopyable & | operator= (const NonCopyable &)=delete |
Friends | |
| class | SettingOwner |
| class | SettingsRegistry |
The untyped part of a setting, which the registry, the console and the overlay use.
|
nodiscard |
Checks a text against the type and the constraints without storing it.
|
protected |
Returns the constraints for a derived class to fill from its traits.
| const SettingConstraints & rex::SettingBase::GetConstraints | ( | ) | const |
Returns what the setting accepts.
| SettingLayer rex::SettingBase::GetLayer | ( | ) | const |
Returns the layer the current value came from.
| const std::string & rex::SettingBase::GetName | ( | ) | const |
Returns the full name, the owner's scope and the member name, such as "apu.mute".
| std::string rex::SettingBase::GetText | ( | ) | const |
Returns the value as text. A path keeps its {scope.name} references.
| bool rex::SettingBase::IsFrozen | ( | ) | const |
Reports whether the value can no longer change, because it is locked or past its life.
| bool rex::SettingBase::IsRestartPending | ( | ) | const |
Reports whether a kRestart setting changed and waits for the next start.
|
nodiscard |
Returns the setting to its default and clears its layer. It fails when the setting is frozen.
|
nodiscardprotected |
Stores a text written by code, in the title layer before launch and the runtime layer after.
|
nodiscard |
Stores a text at a layer.