1#ifndef SETTINGSMANAGER_HH
2#define SETTINGSMANAGER_HH
14class GlobalCommandController;
39 [[nodiscard]]
BaseSetting& getByName(std::string_view cmd, std::string_view name)
const;
40 [[nodiscard]] std::vector<std::string> getTabSettingNames()
const;
44 explicit SettingInfo(
InfoCommand& openMSXInfoCommand);
45 void execute(std::span<const TclObject> tokens,
47 [[nodiscard]] std::string help(std::span<const TclObject> tokens)
const override;
48 void tabCompletion(std::vector<std::string>& tokens)
const override;
53 [[nodiscard]] std::string help(std::span<const TclObject> tokens)
const override;
54 void tabCompletion(std::vector<std::string>& tokens)
const override;
57 class SettingCompleter final :
public CommandCompleter {
59 SettingCompleter(CommandController& commandController,
61 const std::string& name);
62 [[nodiscard]] std::string help(std::span<const TclObject> tokens)
const override;
63 void tabCompletion(std::vector<std::string>& tokens)
const override;
67 SettingCompleter incrCompleter;
68 SettingCompleter unsetCompleter;
70 struct NameFromSetting {
71 [[nodiscard]]
const TclObject& operator()(BaseSetting* s)
const {
72 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)
void registerSetting(BaseSetting &setting)
This file implemented 3 utility functions: