16class CommandController;
17class GlobalCommandController;
43 assert(prefix.starts_with(
"::"));
147 checkFunc = std::move(checkFunc_);
155 void tabCompletion(std::vector<std::string>& tokens)
const override;
178 std::function<void(
TclObject&)> checkFunc;
virtual void setValue(const TclObject &value)=0
Change the value of this setting to the given value.
virtual std::optional< TclObject > getOptionalValue() const =0
Like getValue(), but in case of error returns an empty optional instead of throwing an exception.
virtual void additionalInfo(TclObject &result) const =0
Helper method for info().
void info(TclObject &result) const
For SettingInfo.
virtual void setValueDirect(const TclObject &value)=0
Similar to setValue(), but doesn't trigger Tcl traces.
virtual const TclObject & getValue() const =0
Get current value as a TclObject.
virtual bool needLoadSave() const =0
Does this setting need to be loaded or saved (settings.xml).
virtual std::string_view getTypeString() const =0
Returns a string describing the setting type (integer, string, ..) Could be used in a GUI to pick an ...
virtual TclObject getDefaultValue() const =0
Get the default value of this setting.
void setPrefix(std::string_view prefix)
Set a machine specific prefix.
const TclObject & getFullNameObj() const
Get the name of this setting.
virtual void tabCompletion(std::vector< std::string > &tokens) const =0
Complete a partly typed value.
virtual bool needTransfer() const =0
Does this setting need to be transfered on reverse.
virtual std::string_view getDescription() const =0
pure virtual methods ///
std::string_view getBaseName() const
std::string_view getFullName() const
const TclObject & getBaseNameObj() const
void setChecker(std::function< void(TclObject &)> checkFunc_)
Set value-check-callback.
std::string_view getDescription() const final
pure virtual methods ///
std::optional< TclObject > getOptionalValue() const final
Like getValue(), but in case of error returns an empty optional instead of throwing an exception.
void tabCompletion(std::vector< std::string > &tokens) const override
Complete a partly typed value.
bool needLoadSave() const final
Does this setting need to be loaded or saved (settings.xml).
Setting & operator=(const Setting &)=delete
CommandController & getCommandController() const
bool needTransfer() const final
Does this setting need to be transfered on reverse.
Interpreter & getInterpreter() const
TclObject getDefaultValue() const final
Get the default value of this setting.
const TclObject & getValue() const final
Gets the current value of this setting as a TclObject.
void setValue(const TclObject &newValue) final
Change the value of this setting to the given value.
void notifyPropertyChange() const
Setting & operator=(Setting &&)=delete
void additionalInfo(TclObject &result) const override
Helper method for info().
Setting(const Setting &)=delete
void setValueDirect(const TclObject &newValue) final
Similar to setValue(), but doesn't trigger Tcl traces.
Setting(Setting &&)=delete
Generic Gang-of-Four Subject class of the Observer pattern, templatized edition.
zstring_view getString() const
This file implemented 3 utility functions:
TemporaryString tmpStrCat(Ts &&... ts)