Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

FuegoTestEngine Class Reference

#include <FuegoTestEngine.h>

Inheritance diagram for FuegoTestEngine:

Inheritance graph
[legend]
List of all members.

Detailed Description

GTP interface with commands for testing functionality of the Fuego libraries.

See also:
Overview

Definition at line 19 of file FuegoTestEngine.h.

Public Member Functions

 FuegoTestEngine (GtpInputStream &in, GtpOutputStream &out, int fixedBoardSize, const char *programPath=0, const std::string &player="")
 Constructor.
 ~FuegoTestEngine ()
void CmdAnalyzeCommands (GtpCommand &cmd)
void CmdName (GtpCommand &cmd)
void CmdParam (GtpCommand &cmd)
 Player selection.
void CmdVersion (GtpCommand &cmd)
GoBookBook ()
void DumpState (std::ostream &out) const
void SetAutoSave (const std::string &prefix)
void SetStatisticsFile (const std::string &fileName)
void SetAutoShowBoard (bool showBoard)
void SetDebugToComment (bool debugToComment)
void SetMaxClearBoard (int n)
void SetNamedRules (const std::string &namedRules)
void SetTimeLimit (double timeLimit)
double TimeLimit ()
void SetMpiSynchronizer (const SgMpiSynchronizerHandle &m_handle)
SgMpiSynchronizerHandle MpiSynchronizer ()
const SgMpiSynchronizerHandle MpiSynchronizer () const
void ExecuteFile (const std::string &name, std::ostream &log=std::cerr)
std::string ExecuteCommand (const std::string &cmd, std::ostream &log=std::cerr)
void MainLoop ()
void Register (const std::string &name, GtpCallbackBase *callback)
void Register (const std::string &command, typename GtpCallback< T >::Method method, T *instance)
bool IsRegistered (const std::string &command) const
void SetQuit ()
bool IsQuitSet () const
virtual void Ponder ()
virtual void InitPonder ()
virtual void StopPonder ()
virtual void Interrupt ()
virtual void CmdKnownCommand (GtpCommand &)
virtual void CmdListCommands (GtpCommand &)
virtual void CmdProtocolVersion (GtpCommand &)
virtual void CmdAllLegal (GtpCommand &)
virtual void CmdAllMoveValues (GtpCommand &)
virtual void CmdBoard (GtpCommand &)
virtual void CmdBoardSize (GtpCommand &)
virtual void CmdClearBoard (GtpCommand &)
virtual void CmdClock (GtpCommand &)
virtual void CmdFinalScore (GtpCommand &)
virtual void CmdFixedHandicap (GtpCommand &)
virtual void CmdGenMove (GtpCommand &)
virtual void CmdGenMoveCleanup (GtpCommand &)
virtual void CmdGetKomi (GtpCommand &)
virtual void CmdGGUndo (GtpCommand &)
virtual void CmdInterrupt (GtpCommand &)
virtual void CmdIsLegal (GtpCommand &)
virtual void CmdKgsTimeSettings (GtpCommand &cmd)
virtual void CmdKomi (GtpCommand &)
virtual void CmdListStones (GtpCommand &)
virtual void CmdLoadSgf (GtpCommand &)
virtual void CmdParamRules (GtpCommand &)
virtual void CmdParamTimecontrol (GtpCommand &)
virtual void CmdPlaceFreeHandicap (GtpCommand &)
virtual void CmdPlay (GtpCommand &)
virtual void CmdPlayerBoard (GtpCommand &)
virtual void CmdPlaySequence (GtpCommand &)
virtual void CmdPointNumbers (GtpCommand &)
virtual void CmdPointInfo (GtpCommand &)
virtual void CmdQuit (GtpCommand &cmd)
virtual void CmdRegGenMove (GtpCommand &)
virtual void CmdRegGenMoveToPlay (GtpCommand &)
virtual void CmdRules (GtpCommand &)
virtual void CmdSaveSgf (GtpCommand &)
virtual void CmdSentinelFile (GtpCommand &)
virtual void CmdSetFreeHandicap (GtpCommand &)
virtual void CmdSetInfo (GtpCommand &)
virtual void CmdSetup (GtpCommand &)
virtual void CmdSetupPlayer (GtpCommand &)
virtual void CmdShowBoard (GtpCommand &)
virtual void CmdTimeLastMove (GtpCommand &)
virtual void CmdTimeLeft (GtpCommand &)
virtual void CmdTimeSettings (GtpCommand &)
virtual void CmdUndo (GtpCommand &)

Protected Member Functions

void BeforeHandleCommand ()
void BeforeWritingResponse ()
GoBoardBoard ()
const GoBoardBoard () const
void BoardChanged ()
void CheckLegal (std::string message, SgBlackWhite color, SgPoint move, bool checkOnlyOccupied)
void CheckMaxClearBoard ()
void CheckMoveStackOverflow () const
SgPoint GenMove (SgBlackWhite color, bool ignoreClock)
GoGameGetGame ()
const GoGameGetGame () const
GoPlayerPlayer () const
void RespondNumberArray (GtpCommand &cmd, const SgPointArray< int > &array, int scale)
void SetPlayer (GoPlayer *player)
void Init (int size)
void Play (SgBlackWhite color, SgPoint move)
SgBlackWhite BlackWhiteArg (const GtpCommand &cmd, std::size_t number) const
SgEmptyBlackWhite EmptyBlackWhiteArg (const GtpCommand &cmd, std::size_t number) const
SgPoint EmptyPointArg (const GtpCommand &cmd, std::size_t number) const
SgPoint MoveArg (const GtpCommand &cmd, std::size_t number) const
SgPoint PointArg (const GtpCommand &cmd) const
SgPoint PointArg (const GtpCommand &cmd, std::size_t number) const
SgVector< SgPointPointListArg (const GtpCommand &cmd, std::size_t number) const
SgVector< SgPointPointListArg (const GtpCommand &cmd) const
SgPoint StoneArg (const GtpCommand &cmd, std::size_t number) const
void RulesChanged ()
virtual std::vector< std::string > CreateStatisticsSlots ()
virtual void AddPlayStatistics ()
void AddStatistics (const std::string &key, const std::string &value)
void AddStatistics (const std::string &key, const T &value)

Protected Attributes

GoPlayerm_player
boost::scoped_ptr< GoAutoBookm_autoBook

Private Member Functions

GoPlayerCreatePlayer (const std::string &name)
void SetPlayer (const std::string &playerId)

Private Attributes

GoGtpExtraCommands m_extraCommands
GoSafetyCommands m_safetyCommands
std::string m_playerId
 Player ID as in CreatePlayer().


Constructor & Destructor Documentation

FuegoTestEngine::FuegoTestEngine ( GtpInputStream in,
GtpOutputStream out,
int  fixedBoardSize,
const char *  programPath = 0,
const std::string &  player = "" 
)

Constructor.

Parameters:
in 
out 
fixedBoardSize 
programPath 
player Player ID as in CreatePlayer()

Definition at line 31 of file FuegoTestEngine.cpp.

References CmdParam(), m_extraCommands, m_safetyCommands, GoSafetyCommands::Register(), GoGtpExtraCommands::Register(), GoGtpEngine::Register(), and SetPlayer().

FuegoTestEngine::~FuegoTestEngine (  ) 

Definition at line 45 of file FuegoTestEngine.cpp.


Member Function Documentation

void FuegoTestEngine::CmdAnalyzeCommands ( GtpCommand cmd  )  [virtual]

Reimplemented from GoGtpEngine.

Definition at line 49 of file FuegoTestEngine.cpp.

References GoSafetyCommands::AddGoGuiAnalyzeCommands(), GoGtpExtraCommands::AddGoGuiAnalyzeCommands(), GoGtpEngine::CmdAnalyzeCommands(), m_extraCommands, m_safetyCommands, GtpCommand::Response(), GtpCommand::SetResponse(), and GoGtpCommandUtil::SortResponseAnalyzeCommands().

void FuegoTestEngine::CmdName ( GtpCommand cmd  )  [virtual]

Reimplemented from GoGtpEngine.

Definition at line 60 of file FuegoTestEngine.cpp.

References GoGtpEngine::CmdName(), and m_playerId.

void FuegoTestEngine::CmdParam ( GtpCommand cmd  )  [virtual]

Player selection.

This command is compatible with the GoGui analyze command type "param".

Parameters:

Reimplemented from GoGtpEngine.

Definition at line 74 of file FuegoTestEngine.cpp.

References GtpCommand::Arg(), GtpCommand::CheckNuArgLessEqual(), m_playerId, GtpCommand::NuArg(), GtpCommand::RemainingLine(), SetPlayer(), and SgException::what().

Referenced by FuegoTestEngine().

void FuegoTestEngine::CmdVersion ( GtpCommand cmd  )  [virtual]

Reimplemented from GoGtpEngine.

Definition at line 108 of file FuegoTestEngine.cpp.

GoPlayer * FuegoTestEngine::CreatePlayer ( const std::string &  name  )  [private]

Definition at line 120 of file FuegoTestEngine.cpp.

References GoGtpEngine::Board().

Referenced by SetPlayer().

void FuegoTestEngine::SetPlayer ( const std::string &  playerId  )  [private]

Definition at line 150 of file FuegoTestEngine.cpp.

References CreatePlayer(), m_playerId, and GoGtpEngine::SetPlayer().

Referenced by CmdParam(), and FuegoTestEngine().


Member Data Documentation

GoGtpExtraCommands FuegoTestEngine::m_extraCommands [private]

Definition at line 45 of file FuegoTestEngine.h.

Referenced by CmdAnalyzeCommands(), and FuegoTestEngine().

std::string FuegoTestEngine::m_playerId [private]

Player ID as in CreatePlayer().

Definition at line 50 of file FuegoTestEngine.h.

Referenced by CmdName(), CmdParam(), and SetPlayer().

GoSafetyCommands FuegoTestEngine::m_safetyCommands [private]

Definition at line 47 of file FuegoTestEngine.h.

Referenced by CmdAnalyzeCommands(), and FuegoTestEngine().


The documentation for this class was generated from the following files:


17 Jun 2010 Doxygen 1.4.7