-
-/// UCIOption::value() definition and specializations
-template<typename T>
-T UCIOption::value() const {
-
- assert(type == "spin");
- return T(atoi(currentValue.c_str()));
-}
-
-template<>
-inline std::string UCIOption::value<std::string>() const {
-
- assert(type == "string");
- return currentValue;
-}
-
-template<>
-inline bool UCIOption::value<bool>() const {
-
- assert(type == "check" || type == "button");
- return currentValue == "true";
-}
-
-
-/// Custom comparator because UCI options should be case insensitive
-struct CaseInsensitiveLess {
- bool operator() (const std::string&, const std::string&) const;
-};
-
-
-/// Our options container is actually a map with a customized c'tor
-struct OptionsMap : public std::map<std::string, UCIOption, CaseInsensitiveLess> {
- OptionsMap();
-};
-
-extern std::ostream& operator<<(std::ostream&, const OptionsMap&);