1#ifndef SETTINGSMANAGER_HH
2#define SETTINGSMANAGER_HH
14class GlobalCommandController;
41 [[nodiscard]]
BaseSetting& getByName(std::string_view cmd, std::string_view name)
const;
42 [[nodiscard]] std::vector<std::string> getTabSettingNames()
const;
46 explicit SettingInfo(
InfoCommand& openMSXInfoCommand);
47 void execute(std::span<const TclObject> tokens,
49 [[nodiscard]] std::string help(std::span<const TclObject> tokens)
const override;
50 void tabCompletion(std::vector<std::string>& tokens)
const override;
53 struct SetCompleter final : CommandCompleter {
54 explicit SetCompleter(CommandController& commandController);
55 [[nodiscard]] std::string help(std::span<const TclObject> tokens)
const override;
56 void tabCompletion(std::vector<std::string>& tokens)
const override;
59 class SettingCompleter final :
public CommandCompleter {
61 SettingCompleter(CommandController& commandController,
63 const std::string& name);
64 [[nodiscard]] std::string help(std::span<const TclObject> tokens)
const override;
65 void tabCompletion(std::vector<std::string>& tokens)
const override;
69 SettingCompleter incrCompleter;
70 SettingCompleter unsetCompleter;
72 struct NameFromSetting {
73 [[nodiscard]]
const TclObject& operator()(BaseSetting* s)
const {
74 return s->getFullNameObj();
SettingsManager & operator=(const SettingsManager &)=delete
BaseSetting * findSetting(std::string_view name) const
Find the setting with given name.
SettingsManager(const SettingsManager &)=delete
void unregisterSetting(BaseSetting &setting)
void loadSettings(const SettingsConfig &config)
const auto & getAllSettings() const
void registerSetting(BaseSetting &setting)
This file implemented 3 utility functions: