Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoSafetyCommands.h

Go to the documentation of this file.
00001 //----------------------------------------------------------------------------
00002 /** @file GoSafetyCommands.h */
00003 //----------------------------------------------------------------------------
00004 
00005 #ifndef GO_SAFETYCOMMANDS_H
00006 #define GO_SAFETYCOMMANDS_H
00007 
00008 #include <string>
00009 #include "GtpEngine.h"
00010 #include "SgBWSet.h"
00011 
00012 class GoBoard;
00013 
00014 //----------------------------------------------------------------------------
00015 
00016 /** GTP commands related to safety solvers. */
00017 class GoSafetyCommands
00018 {
00019 public:
00020     /** Constructor.
00021         @param bd The game board.
00022     */
00023     GoSafetyCommands(const GoBoard& bd);
00024 
00025     void AddGoGuiAnalyzeCommands(GtpCommand& cmd);
00026 
00027     /** @page gosafetycommands GoSafetyCommands Commands
00028         - @link CmdDameStatic() @c go_safe_dame_static @endlink
00029         - @link CmdSafe() @c go_safe @endlink
00030         - @link CmdGfx() @c go_safe_gfx @endlink
00031     */
00032     /** @name Command Callbacks */
00033     // @{
00034     // The callback functions are documented in the cpp file
00035     void CmdDameStatic(GtpCommand& cmd);
00036     void CmdGfx(GtpCommand& cmd);
00037     void CmdSafe(GtpCommand& cmd);
00038     // @} // @name
00039 
00040     void Register(GtpEngine& engine);
00041 
00042 private:
00043     const GoBoard& m_bd;
00044 
00045     SgBWSet GetSafe(int& totalRegions, const std::string& type);
00046 
00047     void Register(GtpEngine& e, const std::string& command,
00048                   GtpCallback<GoSafetyCommands>::Method method);
00049 };
00050 
00051 //----------------------------------------------------------------------------
00052 
00053 #endif // GO_SAFETYCOMMANDS_H


17 Jun 2010 Doxygen 1.4.7