X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fucioption.cpp;h=7b8799c48dcec9285c5d5bc10276e07619880515;hp=084e3d0b6a62d329336daf253bbd9ca6fc040f32;hb=c2d42ea8339b49e52a116e488214a14fda09d413;hpb=e17fa64aec39c43708ed80eccb715e36da1cdd64 diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 084e3d0b..7b8799c4 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -17,302 +17,140 @@ along with this program. If not, see . */ - -//// -//// Includes -//// - #include -#include -#include -#include #include -#include #include "misc.h" #include "thread.h" #include "ucioption.h" using std::string; -using std::cout; -using std::endl; - -//// -//// Local definitions -//// - -namespace { - - enum OptionType { SPIN, COMBO, CHECK, STRING, BUTTON }; - - typedef std::vector StrVector; - - struct Option { - string name, defaultValue, currentValue; - OptionType type; - size_t idx; - int minValue, maxValue; - StrVector comboValues; +OptionsMap Options; // Global object - Option(); - Option(const char* defaultValue, OptionType = STRING); - Option(bool defaultValue, OptionType = CHECK); - Option(int defaultValue, int minValue, int maxValue); - bool operator<(const Option& o) const { return idx < o.idx; } - }; - - typedef std::vector