// $Id: SettingPolicy.hh 5300 2006-04-05 08:13:25Z m9710797 $ #ifndef SETTINGPOLICY_HH #define SETTINGPOLICY_HH #include #include namespace openmsx { class CommandController; class TclObject; template class SettingPolicy { protected: typedef T Type; explicit SettingPolicy(CommandController& commandController); void checkSetValue(T& value) const; T checkGetValue(T value) const { return value; } // std::string toString(T value) const; // T fromString(const std::string& str) const; void tabCompletion(std::vector& tokens) const; void additionalInfo(TclObject& result) const; CommandController& getCommandController() const { return commandController; } private: CommandController& commandController; }; template SettingPolicy::SettingPolicy(CommandController& commandController_) : commandController(commandController_) { } template void SettingPolicy::checkSetValue(T& /*value*/) const { } template void SettingPolicy::tabCompletion(std::vector& /*tokens*/) const { } template void SettingPolicy::additionalInfo(TclObject& /*result*/) const { } } // namespace openmsx #endif