openMSX
BooleanSetting.hh
Go to the documentation of this file.
1 #ifndef BOOLEANSETTING_HH
2 #define BOOLEANSETTING_HH
3 
4 #include "SettingPolicy.hh"
5 #include "SettingImpl.hh"
6 
7 namespace openmsx {
8 
9 class BooleanSettingPolicy : public SettingPolicy<bool>
10 {
11 protected:
12  explicit BooleanSettingPolicy();
13  std::string toString(bool value) const;
14  bool fromString(const std::string& str) const;
15  string_ref getTypeString() const;
16  void tabCompletion(std::vector<std::string>& tokens) const;
17 };
18 
19 class BooleanSetting : public SettingImpl<BooleanSettingPolicy>
20 {
21 public:
22  BooleanSetting(CommandController& commandController,
23  string_ref name, string_ref description,
24  bool initialValue, SaveSetting save = SAVE);
25 };
26 
27 } // namespace openmsx
28 
29 #endif