00001 //---------------------------------------------------------------------------- 00002 /** @file GoGtpExtraCommands.h 00003 */ 00004 //---------------------------------------------------------------------------- 00005 00006 #ifndef GO_GTPEXTRACOMMANDS_H 00007 #define GO_GTPEXTRACOMMANDS_H 00008 00009 #include <string> 00010 #include "GtpEngine.h" 00011 00012 class GoBoard; 00013 class GoPlayer; 00014 00015 //---------------------------------------------------------------------------- 00016 00017 /** Extra GTP commands to access functionality of the Go library. 00018 Contains commands that are mainly useful for debugging and testing 00019 the Go library and that not all Go GTP engines may want to register. 00020 */ 00021 class GoGtpExtraCommands 00022 { 00023 public: 00024 /** Constructor. 00025 @param bd The game board. 00026 */ 00027 GoGtpExtraCommands(GoBoard& bd); 00028 00029 void AddGoGuiAnalyzeCommands(GtpCommand& cmd); 00030 00031 /** @page gogtpextracommands GoGtpExtraCommands Commands 00032 - @link CmdCfgDistance() @c go_distance @endlink 00033 - @link CmdLadder() @c go_ladder @endlink 00034 - @link CmdStaticLadder() @c go_static_ladder @endlink 00035 */ 00036 /** @name Command Callbacks */ 00037 // @{ 00038 // The callback functions are documented in the cpp file 00039 void CmdCfgDistance(GtpCommand& cmd); 00040 void CmdLadder(GtpCommand& cmd); 00041 void CmdStaticLadder(GtpCommand& cmd); 00042 // @} // @name 00043 00044 void Register(GtpEngine& engine); 00045 00046 private: 00047 GoBoard& m_bd; 00048 00049 void Register(GtpEngine& e, const std::string& command, 00050 GtpCallback<GoGtpExtraCommands>::Method method); 00051 }; 00052 00053 //---------------------------------------------------------------------------- 00054 00055 #endif // GO_GTPEXTRACOMMANDS_H