openMSX
Public Member Functions | List of all members
openmsx::ProxySetting Class Referencefinal

#include <ProxySetting.hh>

Inheritance diagram for openmsx::ProxySetting:
Inheritance graph
[legend]
Collaboration diagram for openmsx::ProxySetting:
Collaboration graph
[legend]

Public Member Functions

 ProxySetting (Reactor &reactor, const TclObject &name)
 
void setValue (const TclObject &value) override
 Change the value of this setting to the given value.
 
std::string_view getTypeString () const override
 Returns a string describing the setting type (integer, string, ..) Could be used in a GUI to pick an appropriate setting widget.
 
std::string_view getDescription () const override
 pure virtual methods ///
 
const TclObjectgetValue () const override
 Get current value as a TclObject.
 
std::optional< TclObjectgetOptionalValue () const override
 Like getValue(), but in case of error returns an empty optional instead of throwing an exception.
 
TclObject getDefaultValue () const override
 Get the default value of this setting.
 
void setValueDirect (const TclObject &value) override
 Similar to setValue(), but doesn't trigger Tcl traces.
 
void tabCompletion (std::vector< std::string > &tokens) const override
 Complete a partly typed value.
 
bool needLoadSave () const override
 Does this setting need to be loaded or saved (settings.xml).
 
bool needTransfer () const override
 Does this setting need to be transfered on reverse.
 
void additionalInfo (TclObject &result) const override
 Helper method for info().
 
- Public Member Functions inherited from openmsx::BaseSetting
const TclObjectgetFullNameObj () const
 Get the name of this setting.
 
const TclObjectgetBaseNameObj () const
 
std::string_view getFullName () const
 
std::string_view getBaseName () const
 
void setPrefix (std::string_view prefix)
 Set a machine specific prefix.
 
void info (TclObject &result) const
 For SettingInfo.
 

Additional Inherited Members

- Protected Member Functions inherited from openmsx::BaseSetting
 BaseSetting (std::string_view name)
 
 BaseSetting (TclObject name)
 
 ~BaseSetting ()=default
 

Detailed Description

Definition at line 10 of file ProxySetting.hh.

Constructor & Destructor Documentation

◆ ProxySetting()

openmsx::ProxySetting::ProxySetting ( Reactor reactor,
const TclObject name 
)

Definition at line 10 of file ProxySetting.cc.

Member Function Documentation

◆ additionalInfo()

void openmsx::ProxySetting::additionalInfo ( TclObject result) const
overridevirtual

Helper method for info().

Implements openmsx::BaseSetting.

Definition at line 117 of file ProxySetting.cc.

References setting.

◆ getDefaultValue()

TclObject openmsx::ProxySetting::getDefaultValue ( ) const
overridevirtual

Get the default value of this setting.

This is the initial value of the setting. Default values don't get saved in 'settings.xml'. This is also the value used for a Tcl 'unset' command.

Implements openmsx::BaseSetting.

Definition at line 73 of file ProxySetting.cc.

References setting.

◆ getDescription()

std::string_view openmsx::ProxySetting::getDescription ( ) const
overridevirtual

pure virtual methods ///

Get a description of this setting that can be presented to the user.

Implements openmsx::BaseSetting.

Definition at line 46 of file ProxySetting.cc.

References setting.

◆ getOptionalValue()

std::optional< TclObject > openmsx::ProxySetting::getOptionalValue ( ) const
overridevirtual

Like getValue(), but in case of error returns an empty optional instead of throwing an exception.

Implements openmsx::BaseSetting.

Definition at line 64 of file ProxySetting.cc.

References setting.

◆ getTypeString()

std::string_view openmsx::ProxySetting::getTypeString ( ) const
overridevirtual

Returns a string describing the setting type (integer, string, ..) Could be used in a GUI to pick an appropriate setting widget.

Implements openmsx::BaseSetting.

Definition at line 37 of file ProxySetting.cc.

References openmsx::BaseSetting::getFullName(), and setting.

◆ getValue()

const TclObject & openmsx::ProxySetting::getValue ( ) const
overridevirtual

Get current value as a TclObject.

Implements openmsx::BaseSetting.

Definition at line 55 of file ProxySetting.cc.

References openmsx::BaseSetting::getFullName(), and setting.

◆ needLoadSave()

bool openmsx::ProxySetting::needLoadSave ( ) const
overridevirtual

Does this setting need to be loaded or saved (settings.xml).

Implements openmsx::BaseSetting.

Definition at line 99 of file ProxySetting.cc.

References setting.

◆ needTransfer()

bool openmsx::ProxySetting::needTransfer ( ) const
overridevirtual

Does this setting need to be transfered on reverse.

Implements openmsx::BaseSetting.

Definition at line 108 of file ProxySetting.cc.

References setting.

◆ setValue()

void openmsx::ProxySetting::setValue ( const TclObject value)
overridevirtual

Change the value of this setting to the given value.

This method will trigger Tcl traces. This value still passes via the 'checker-callback' (see below), so the value may be adjusted. Or in case of an invalid value this method may throw.

Implements openmsx::BaseSetting.

Definition at line 30 of file ProxySetting.cc.

References setting, and openmsx::BaseSetting::setValue().

◆ setValueDirect()

void openmsx::ProxySetting::setValueDirect ( const TclObject value)
overridevirtual

Similar to setValue(), but doesn't trigger Tcl traces.

Like setValue(), the given value may be adjusted or rejected. Should only be used by the Interpreter class.

Implements openmsx::BaseSetting.

Definition at line 82 of file ProxySetting.cc.

References openmsx::BaseSetting::getFullName(), and setting.

◆ tabCompletion()

void openmsx::ProxySetting::tabCompletion ( std::vector< std::string > &  tokens) const
overridevirtual

Complete a partly typed value.

Default implementation does not complete anything, subclasses can override this to complete according to their specific value type.

Implements openmsx::BaseSetting.

Definition at line 92 of file ProxySetting.cc.

References setting.


The documentation for this class was generated from the following files: