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

Singleton implementation of application. More...

#include <belofte.h>

+ Collaboration diagram for appInstance:

Public Member Functions

 appInstance ()
 
 ~appInstance ()
 
 appInstance (appInstance const &)=delete
 
 appInstance (appInstance &&)=delete
 
appInstanceoperator= (appInstance const &)=delete
 
appInstanceoperator= (appInstance &&)=delete
 
std::string const setMode (std::string const &iName)
 
std::string const & getMode () const
 
void setConfig (std::string const &s, int64_t v)
 
int64_t getConfig (std::string const &s, int64_t v)
 
void setConfig (std::string const &s, std::string const &v)
 
std::string getConfig (std::string const &s, std::string const &v)
 
void setName (char *sName)
 set name of executable based on argv[0] Remove leading / and \ characters Remove trailing .exe if present
 
std::string getName () const
 

Public Attributes

outputWriter bout
 
outputWriter sout
 normal output
 
commandReader m_reader
 searching output
 
bel_hash m_hashEngine
 read input
 
bel_debug m_debuginterface
 
engineInterfacem_ui
 
bGamem_game
 

Detailed Description

Singleton implementation of application.

Definition at line 148 of file belofte.h.

Constructor & Destructor Documentation

◆ appInstance() [1/3]

appInstance::appInstance ( )

Definition at line 140 of file belofte.cpp.

Referenced by appInstance(), appInstance(), operator=(), and operator=().

+ Here is the caller graph for this function:

◆ ~appInstance()

appInstance::~appInstance ( )

Definition at line 160 of file belofte.cpp.

◆ appInstance() [2/3]

appInstance::appInstance ( appInstance const & )
delete
+ Here is the call graph for this function:

◆ appInstance() [3/3]

appInstance::appInstance ( appInstance && )
delete
+ Here is the call graph for this function:

Member Function Documentation

◆ operator=() [1/2]

appInstance & appInstance::operator= ( appInstance const & )
delete
+ Here is the call graph for this function:

◆ operator=() [2/2]

appInstance & appInstance::operator= ( appInstance && )
delete
+ Here is the call graph for this function:

◆ setMode()

std::string const appInstance::setMode ( std::string const & iName)

Definition at line 170 of file belofte.cpp.

Referenced by cmd_belofte::execute(), cmd_uci::execute(), cmd_ucinewgame::execute(), cmd_xboard::execute(), and main().

+ Here is the caller graph for this function:

◆ getMode()

std::string const & appInstance::getMode ( ) const
inline

Definition at line 161 of file belofte.h.

◆ setConfig() [1/2]

void appInstance::setConfig ( std::string const & s,
int64_t v )
Remarks
C++17 would allow std::any to combine both we could use a template as well

Definition at line 178 of file belofte.cpp.

Referenced by cmd_computer::execute(), cmd_name::execute(), cmd_random::execute(), cmd_UCI_Opponent::execute(), main(), bConfigurableGame::setAlgorithm(), and setName().

+ Here is the caller graph for this function:

◆ getConfig() [1/2]

int64_t appInstance::getConfig ( std::string const & s,
int64_t v )

Definition at line 183 of file belofte.cpp.

Referenced by bGame::DoSearch(), cmd_about::execute(), getName(), and bel_debug::info().

+ Here is the caller graph for this function:

◆ setConfig() [2/2]

void appInstance::setConfig ( std::string const & s,
std::string const & v )

Definition at line 189 of file belofte.cpp.

◆ getConfig() [2/2]

std::string appInstance::getConfig ( std::string const & s,
std::string const & v )

Definition at line 194 of file belofte.cpp.

◆ setName()

void appInstance::setName ( char * sName)

set name of executable based on argv[0] Remove leading / and \ characters Remove trailing .exe if present

Definition at line 204 of file belofte.cpp.

Referenced by main().

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

◆ getName()

std::string appInstance::getName ( ) const

Definition at line 218 of file belofte.cpp.

Referenced by bel_debug::info().

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

Member Data Documentation

◆ bout

◆ sout

◆ m_reader

commandReader appInstance::m_reader

searching output

Definition at line 175 of file belofte.h.

Referenced by appInstance(), cmd_exec::execute(), cmd_execat::execute(), main(), and commandReader::runner().

◆ m_hashEngine

bel_hash appInstance::m_hashEngine

read input

Definition at line 176 of file belofte.h.

Referenced by appInstance(), and main().

◆ m_debuginterface

bel_debug appInstance::m_debuginterface

Definition at line 177 of file belofte.h.

Referenced by appInstance(), cmd_debug::execute(), and cmd_info::execute().

◆ m_ui

engineInterface* appInstance::m_ui

Definition at line 178 of file belofte.h.

Referenced by AppEI(), appInstance(), and setMode().

◆ m_game

bGame* appInstance::m_game

Definition at line 179 of file belofte.h.

Referenced by appInstance(), and Game().