Belofte version 2.1.8
A promising chess program using the UCI or Winboard interface
UCIMode Class Reference

implementation of specific implementation More...

#include <belofte.h>

+ Inheritance diagram for UCIMode:
+ Collaboration diagram for UCIMode:

Public Member Functions

 UCIMode (std::string const &n="uci")
 
 ~UCIMode () override
 
bool isRunning () const override
 
void sendInfo (std::string const &info) override
 
void sendDebug (int const l, std::string const &info) override
 
void sendMove (bBoard &b, bMove const &m) override
 
void sendResult (bBoard const &b UNUSED, gameResult_t rs UNUSED) const override
 
void sendInfoDepth (int depth, int seldepth, int64_t nodes, int nps) override
 
void sendInfoScore (long long timems, bBoard const &b, bScore const cp) override
 
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 override
 
void sendInfoCurrMove (bBoard const &b, depth_t const nLogDepth, depth_t const nMaxDepth, std::string const &comment, bMove const &m, movenum_t const moveid, int64_t const nodes) const override
 
- Public Member Functions inherited from engineInterface
 engineInterface (std::string const &n, std::string const &h="")
 Common commands to all modes.
 
virtual ~engineInterface ()
 
 engineInterface (engineInterface const &)=delete
 
 engineInterface (engineInterface &&)=delete
 
engineInterfaceoperator= (engineInterface const &)=delete
 
engineInterfaceoperator= (engineInterface &&)=delete
 
 operator std::string () const &
 
void execute (std::string const &command, std::string const &params)
 
virtual void setRunning (bool const r)
 
virtual void sendPrompt ()
 
virtual void sendResponse (std::string const &response)
 
virtual void sendInvalidMove (std::string const &info, std::string const &reason)
 
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 sendResult (bBoard const &b, gameResult_t rs) const
 
std::string const & getHint () const
 

Additional Inherited Members

- Static Public Attributes inherited from engineInterface
static engineCommands_t m_engineCommands = decltype(engineInterface::m_engineCommands){}
 
- Protected Member Functions inherited from engineInterface
void attachCommand (belofte::stringList const &sCommands, bool const published=true)
 

Detailed Description

implementation of specific implementation

Definition at line 249 of file belofte.h.

Constructor & Destructor Documentation

◆ UCIMode()

UCIMode::UCIMode ( std::string const &  n = "uci")
explicit

Definition at line 367 of file belofte.cpp.

+ Here is the call graph for this function:

◆ ~UCIMode()

UCIMode::~UCIMode ( )
override

Definition at line 375 of file belofte.cpp.

Member Function Documentation

◆ isRunning()

bool UCIMode::isRunning ( ) const
inlineoverridevirtual

Reimplemented from engineInterface.

Definition at line 255 of file belofte.h.

◆ sendInfo()

void UCIMode::sendInfo ( std::string const &  info)
overridevirtual

Reimplemented from engineInterface.

Definition at line 189 of file usercmd.cpp.

+ Here is the call graph for this function:

◆ sendDebug()

void UCIMode::sendDebug ( int const  l,
std::string const &  info 
)
overridevirtual

Reimplemented from engineInterface.

Definition at line 196 of file usercmd.cpp.

+ Here is the call graph for this function:

◆ sendMove()

void UCIMode::sendMove ( bBoard b,
bMove const &  m 
)
overridevirtual
Todo:
retrieve ponder out of board

Reimplemented from engineInterface.

Definition at line 179 of file usercmd.cpp.

+ Here is the call graph for this function:

◆ sendResult()

void UCIMode::sendResult ( bBoard const &b  UNUSED,
gameResult_t rs  UNUSED 
) const
inlineoverride

Definition at line 260 of file belofte.h.

◆ sendInfoDepth()

void UCIMode::sendInfoDepth ( int  depth,
int seldepth  DEVUNUSED,
int64_t  nodes,
int  nps 
)
overridevirtual

Reimplemented from engineInterface.

Definition at line 203 of file usercmd.cpp.

+ Here is the call graph for this function:

◆ sendInfoScore()

void UCIMode::sendInfoScore ( long long timems  DEVUNUSED,
bBoard const &  b,
bScore const  cp 
)
overridevirtual

Reimplemented from engineInterface.

Definition at line 218 of file usercmd.cpp.

+ Here is the call graph for this function:

◆ sendInfoSearching()

void UCIMode::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
overridevirtual
Todo:
only print currline in case requested by UI

Reimplemented from engineInterface.

Definition at line 256 of file usercmd.cpp.

+ Here is the call graph for this function:

◆ sendInfoCurrMove()

void UCIMode::sendInfoCurrMove ( bBoard const &  b,
depth_t const  nLogDepth,
depth_t const nMaxDepth  ,
std::string const &  comment,
bMove const &  m,
movenum_t const  moveid,
int64_t const  nodes 
) const
overridevirtual
Todo:
only print currline in case requested by UI

Reimplemented from engineInterface.

Definition at line 309 of file usercmd.cpp.

+ Here is the call graph for this function: