00001 //---------------------------------------------------------------------------- 00002 /** @file BookCommands.hpp 00003 */ 00004 //---------------------------------------------------------------------------- 00005 00006 #ifndef BOOKCOMMANDS_HPP 00007 #define BOOKCOMMANDS_HPP 00008 00009 #include "Book.hpp" 00010 #include "BookCheck.hpp" 00011 #include "Game.hpp" 00012 #include "HexBoard.hpp" 00013 #include "HexHtpEngine.hpp" 00014 #include "HexEnvironment.hpp" 00015 00016 _BEGIN_BENZENE_NAMESPACE_ 00017 00018 //---------------------------------------------------------------------------- 00019 00020 /** Commands for inspecting opening books. */ 00021 class BookCommands 00022 { 00023 public: 00024 BookCommands(Game& game, HexEnvironment& env, 00025 boost::scoped_ptr<Book>& m_book, BookCheck& bookCheck); 00026 00027 ~BookCommands(); 00028 00029 void Register(GtpEngine& engine); 00030 00031 protected: 00032 Game& m_game; 00033 00034 HexEnvironment& m_env; 00035 00036 boost::scoped_ptr<Book>& m_book; 00037 00038 BookCheck& m_bookCheck; 00039 00040 private: 00041 void Register(GtpEngine& engine, const std::string& command, 00042 GtpCallback<BookCommands>::Method method); 00043 00044 void CmdBookOpen(HtpCommand& cmd); 00045 void CmdBookClose(HtpCommand& cmd); 00046 void CmdBookStat(HtpCommand& cmd); 00047 void CmdBookMainLineDepth(HtpCommand& cmd); 00048 void CmdBookCounts(HtpCommand& cmd); 00049 void CmdBookScores(HtpCommand& cmd); 00050 void CmdBookVisualize(HtpCommand& cmd); 00051 void CmdBookDumpPolarizedLeafs(HtpCommand& cmd); 00052 void CmdBookImportSolvedStates(HtpCommand& cmd); 00053 void CmdBookSetValue(HtpCommand& cmd); 00054 void CmdBookParam(HtpCommand& cmd); 00055 }; 00056 00057 //---------------------------------------------------------------------------- 00058 00059 _END_BENZENE_NAMESPACE_ 00060 00061 #endif // BOOKCOMMANDS_HPP