openMSX
SettingPolicy.hh
Go to the documentation of this file.
1 #ifndef SETTINGPOLICY_HH
2 #define SETTINGPOLICY_HH
3 
4 #include <string>
5 #include <vector>
6 
7 namespace openmsx {
8 
9 class CommandController;
10 class TclObject;
11 
12 template <typename T> class SettingPolicy
13 {
14 protected:
15  typedef T Type;
16 
17  explicit SettingPolicy();
18 
19  void checkSetValue(T& value) const;
20  T checkGetValue(T value) const { return value; }
21  // std::string toString(T value) const;
22  // T fromString(const std::string& str) const;
23  void tabCompletion(std::vector<std::string>& tokens) const;
24  void additionalInfo(TclObject& result) const;
25 };
26 
27 template <typename T>
29 {
30 }
31 
32 template <typename T>
33 void SettingPolicy<T>::checkSetValue(T& /*value*/) const
34 {
35 }
36 
37 template <typename T>
38 void SettingPolicy<T>::tabCompletion(std::vector<std::string>& /*tokens*/) const
39 {
40 }
41 
42 template <typename T>
44 {
45 }
46 
47 } // namespace openmsx
48 
49 #endif