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  std::string_view getTypeString() const override;
17  std::string_view getDescription() const override;
18  const TclObject& getValue() const override;
19  TclObject getDefaultValue() const override;
20  TclObject getRestoreValue() const override;
21  void setValueDirect(const TclObject& value) override;
22  void tabCompletion(std::vector<std::string>& tokens) const override;
23  bool needLoadSave() const override;
24  bool needTransfer() const override;
25  void setDontSaveValue(const TclObject& dontSaveValue) override;
26  void additionalInfo(TclObject& result) const override;
27 
28 private:
29  BaseSetting* getSetting();
30  const BaseSetting* getSetting() const;
31 
32  Reactor& reactor;
33 };
34 
35 } // namespace openmsx
36 
37 #endif
openmsx::ProxySetting::setValue
void setValue(const TclObject &value) override
Change the value of this setting to the given value.
Definition: ProxySetting.cc:33
openmsx::ProxySetting::needTransfer
bool needTransfer() const override
Does this setting need to be transfered on reverse.
Definition: ProxySetting.cc:111
Setting.hh
openmsx::ProxySetting::setValueDirect
void setValueDirect(const TclObject &value) override
Similar to setValue(), but doesn't trigger Tcl traces.
Definition: ProxySetting.cc:85
openmsx::ProxySetting::getTypeString
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:40
openmsx::ProxySetting
Definition: ProxySetting.hh:10
openmsx::ProxySetting::setDontSaveValue
void setDontSaveValue(const TclObject &dontSaveValue) override
This value will never end up in the settings.xml file.
Definition: ProxySetting.cc:120
openmsx::ProxySetting::needLoadSave
bool needLoadSave() const override
Does this setting need to be loaded or saved (settings.xml).
Definition: ProxySetting.cc:102
openmsx::Reactor
Contains the main loop of openMSX.
Definition: Reactor.hh:66
openmsx::ProxySetting::additionalInfo
void additionalInfo(TclObject &result) const override
Helper method for info().
Definition: ProxySetting.cc:127
openmsx::BaseSetting
Definition: Setting.hh:18
openmsx::ProxySetting::getValue
const TclObject & getValue() const override
Get current value as a TclObject.
Definition: ProxySetting.cc:58
openmsx::ProxySetting::tabCompletion
void tabCompletion(std::vector< std::string > &tokens) const override
Complete a partly typed value.
Definition: ProxySetting.cc:95
openmsx::ProxySetting::getDescription
std::string_view getDescription() const override
pure virtual methods ///
Definition: ProxySetting.cc:49
openmsx::ProxySetting::ProxySetting
ProxySetting(Reactor &reactor, const TclObject &name)
Definition: ProxySetting.cc:13
openmsx::ProxySetting::getRestoreValue
TclObject getRestoreValue() const override
Get the value that will be set after a Tcl 'unset' command.
Definition: ProxySetting.cc:76
openmsx::TclObject
Definition: TclObject.hh:21
openmsx::ProxySetting::getDefaultValue
TclObject getDefaultValue() const override
Get the default value of this setting.
Definition: ProxySetting.cc:67
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5