+namespace UCI {
+
+class Option;
+
+/// 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 std::map
+typedef std::map<std::string, Option, CaseInsensitiveLess> OptionsMap;
+
+/// Option class implements an option as defined by UCI protocol
+class Option {
+
+ typedef void (Fn)(const Option&);
+
+public:
+ Option(Fn* = NULL);
+ Option(bool v, Fn* = NULL);
+ Option(const char* v, Fn* = NULL);
+ Option(int v, int min, int max, Fn* = NULL);