OXYGENHUB
◆ main openmsx / src / settings / StringSetting.hh
600 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
e8555c89 Andy McCall 1
#ifndef STRINGSETTING_HH
2
#define STRINGSETTING_HH
3
4
#include "Setting.hh"
5
6
namespace openmsx {
7
8
class StringSetting final : public Setting
9
{
10
public:
11
	StringSetting(CommandController& commandController,
12
	              std::string_view name, static_string_view description,
13
	              std::string_view initialValue, Save save = Save::YES);
14
15
	[[nodiscard]] std::string_view getTypeString() const override;
16
17
	[[nodiscard]] zstring_view getString() const noexcept { return getValue().getString(); }
18
	void setString(std::string_view str) { setValue(TclObject(str)); }
19
};
20
21
} // namespace openmsx
22
23
#endif