openMSX
ProxySetting.hh
Go to the documentation of this file.
1 #ifndef PROXYSETTING_HH
2 #define PROXYSETTING_HH
3 
4 #include "Setting.hh"
5 
6 namespace openmsx {
7 
8 class Reactor;
9 
10 class ProxySetting final : public BaseSetting
11 {
12 public:
13  ProxySetting(Reactor& reactor, const TclObject& name);
14 
15  void setValue(const TclObject& value) override;
16  [[nodiscard]] std::string_view getTypeString() const override;
17  [[nodiscard]] std::string_view getDescription() const override;
18  [[nodiscard]] const TclObject& getValue() const override;
19  [[nodiscard]] std::optional<TclObject> getOptionalValue() const override;
20  [[nodiscard]] TclObject getDefaultValue() const override;
21  [[nodiscard]] TclObject getRestoreValue() const override;
22  void setValueDirect(const TclObject& value) override;
23  void tabCompletion(std::vector<std::string>& tokens) const override;
24  [[nodiscard]] bool needLoadSave() const override;
25  [[nodiscard]] bool needTransfer() const override;
26  void setDontSaveValue(const TclObject& dontSaveValue) override;
27  void additionalInfo(TclObject& result) const override;
28 
29 private:
30  [[nodiscard]] BaseSetting* getSetting();
31  [[nodiscard]] const BaseSetting* getSetting() const;
32 
33 private:
34  Reactor& reactor;
35 };
36 
37 } // namespace openmsx
38 
39 #endif
bool needLoadSave() const override
Does this setting need to be loaded or saved (settings.xml).
void additionalInfo(TclObject &result) const override
Helper method for info().
void setDontSaveValue(const TclObject &dontSaveValue) override
This value will never end up in the settings.xml file.
TclObject getRestoreValue() const override
Get the value that will be set after a Tcl 'unset' command.
Definition: ProxySetting.cc:82
std::optional< TclObject > getOptionalValue() const override
Like getValue(), but in case of error returns an empty optional instead of throwing an exception.
Definition: ProxySetting.cc:64
TclObject getDefaultValue() const override
Get the default value of this setting.
Definition: ProxySetting.cc:73
void tabCompletion(std::vector< std::string > &tokens) const override
Complete a partly typed value.
void setValueDirect(const TclObject &value) override
Similar to setValue(), but doesn't trigger Tcl traces.
Definition: ProxySetting.cc:91
ProxySetting(Reactor &reactor, const TclObject &name)
Definition: ProxySetting.cc:10
const TclObject & getValue() const override
Get current value as a TclObject.
Definition: ProxySetting.cc:55
void setValue(const TclObject &value) override
Change the value of this setting to the given value.
Definition: ProxySetting.cc:30
std::string_view getTypeString() const override
Returns a string describing the setting type (integer, string, ..) Could be used in a GUI to pick an ...
Definition: ProxySetting.cc:37
std::string_view getDescription() const override
pure virtual methods ///
Definition: ProxySetting.cc:46
bool needTransfer() const override
Does this setting need to be transfered on reverse.
Contains the main loop of openMSX.
Definition: Reactor.hh:68
This file implemented 3 utility functions:
Definition: Autofire.cc:9