- Option(); // To allow insertion in a std::map
- Option(const char* defaultValue, std::string type = "string");
- Option(bool defaultValue, std::string type = "check");
- Option(int defaultValue, int minValue, int maxValue);
+ UCIOption(Fn* = NULL);
+ UCIOption(bool v, Fn* = NULL);
+ UCIOption(const char* v, Fn* = NULL);
+ UCIOption(int v, int min, int max, Fn* = NULL);
+
+ void operator=(const std::string& v);
+
+ operator int() const {
+ assert(type == "check" || type == "spin");
+ return (type == "spin" ? atoi(currentValue.c_str()) : currentValue == "true");
+ }