Belofte version 2.1.9
A promising chess program using the UCI or Winboard interface
XboardMode Class Reference

#include <engineinterface.h>

+ Inheritance diagram for XboardMode:
+ Collaboration diagram for XboardMode:

Public Member Functions

 XboardMode (std::string const &s="xboard")
 
 ~XboardMode () override
 
void sendInfo (std::string const &info) override
 
void sendDebug (int const l, std::string const &info) override
 
void sendResult (bBoard const &b, gameResult_t const gr) const override
 
void sendInvalidMove (std::string const &info, std::string const &reason) override
 
void sendInfoSearching (bBoard const &b, int const nLogDepth, depth_t const nMaxDepth, bScore const sc, int64_t const t, int64_t const nodes) const override
 
std::string engineGameResultString (gameResult_t const gr) const override
 
- Public Member Functions inherited from engineInterface
 engineInterface (std::string const &s, std::string const &h="")
 Common commands to all modes this ctor is called for each iface.
 
virtual ~engineInterface ()
 
 engineInterface (engineInterface const &)=delete
 
 engineInterface (engineInterface &&)=delete
 
engineInterfaceoperator= (engineInterface const &)=delete
 
engineInterfaceoperator= (engineInterface &&)=delete
 
void execute (std::string const &command, std::string const &params)
 
virtual void setRunning (bool const r)
 
virtual bool isRunning () const
 
virtual void sendPrompt ()
 
virtual void sendResponse (std::string const &response)
 
virtual void sendError (std::string const &error, std::string const &description)
 
virtual void sendHelp (std::string const &args)
 Send help on command or all commands.
 
virtual void sendMove (bBoard &b, bMove const &m)
 
virtual void sendInfoSearchStart (std::string const &info)
 
virtual void sendInfoDepth (int depth, int seldepth, int64_t nodes, int nps)
 
virtual void sendInfoSearching (bBoard const &b, int const nLogDepth, depth_t const nMaxDepth, std::string const &comment, bScore const sc, int64_t const t, int64_t const nodes) const
 
virtual void sendInfoCurrMove (bBoard const &b, depth_t const nCurDepth, bMove const &m, movenum_t const moveid, int64_t const nodes) const
 
std::string const & getHint () const
 
 operator std::string () const &
 

Protected Member Functions

std::string scoreString (bScore const score) const override
 
- Protected Member Functions inherited from engineInterface
void attachCommand (belofte::stringList const &sCommands, bool const published=true)
 

Additional Inherited Members

- Static Public Member Functions inherited from engineInterface
static std::string scoreAsString (bScore const score)
 
- Static Protected Member Functions inherited from engineInterface
static engineCommands_tgetEngineCommands ()
 

Detailed Description

Definition at line 168 of file engineinterface.h.

Constructor & Destructor Documentation

◆ XboardMode()

XboardMode::XboardMode ( std::string const & s = "xboard")
explicit

Definition at line 452 of file engineinterface.cpp.

+ Here is the call graph for this function:

◆ ~XboardMode()

XboardMode::~XboardMode ( )
inlineoverride

Definition at line 171 of file engineinterface.h.

Member Function Documentation

◆ sendInfo()

void XboardMode::sendInfo ( std::string const & info)
overridevirtual
Todo
check if line needs to be split for respecting tmplevel

Reimplemented from engineInterface.

Definition at line 462 of file engineinterface.cpp.

+ Here is the call graph for this function:

◆ sendDebug()

void XboardMode::sendDebug ( int const l,
std::string const & info )
overridevirtual
Bug
why do we need to split in 2 lines?

Reimplemented from engineInterface.

Definition at line 469 of file engineinterface.cpp.

+ Here is the call graph for this function:

◆ sendResult()

void XboardMode::sendResult ( bBoard const & b,
gameResult_t const gr ) const
overridevirtual

Reimplemented from engineInterface.

Definition at line 518 of file engineinterface.cpp.

+ Here is the call graph for this function:

◆ sendInvalidMove()

void XboardMode::sendInvalidMove ( std::string const & info,
std::string const & reason )
overridevirtual

Reimplemented from engineInterface.

Definition at line 476 of file engineinterface.cpp.

+ Here is the call graph for this function:

◆ sendInfoSearching()

void XboardMode::sendInfoSearching ( bBoard const & b,
int const nLogDepth,
depth_t const nMaxDepth,
bScore const sc,
int64_t const t,
int64_t const nodes ) const
overridevirtual

Reimplemented from engineInterface.

Definition at line 488 of file engineinterface.cpp.

+ Here is the call graph for this function:

◆ engineGameResultString()

std::string XboardMode::engineGameResultString ( gameResult_t const gr) const
overridevirtual

Reimplemented from engineInterface.

Definition at line 545 of file engineinterface.cpp.

Referenced by sendResult().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scoreString()

std::string XboardMode::scoreString ( bScore const score) const
overrideprotectedvirtual

Reimplemented from engineInterface.

Definition at line 533 of file engineinterface.cpp.

Referenced by sendInfoSearching().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: