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

output to std::cout and if required to debug and log-file More...

#include <bel_debug.h>

+ Inheritance diagram for outputWriter:
+ Collaboration diagram for outputWriter:

Public Member Functions

 outputWriter (std::ostream &os)
 Outputwriter class will log to debug file, stdout and log file in this order if they have been initialized before.
 
 ~outputWriter () override
 
 outputWriter (outputWriter const &)=delete
 
 outputWriter (outputWriter &&)=delete
 
outputWriteroperator= (outputWriter const &)=delete
 
outputWriteroperator= (outputWriter &&)=delete
 
void setLevel (int const l)
 
int getLevel () const
 
bool attach (std::string const &fn)
 
void detach ()
 
bool isAttached () const
 
std::string const & fn () const
 
outputWriteroperator() (int const l)
 
outputWriterendl ()
 
std::ostream & getOs ()
 
std::ostream & getFos ()
 

Friends

template<typename T >
std::ostream & operator<< (outputWriter &log, T o)
 

Detailed Description

output to std::cout and if required to debug and log-file

Definition at line 35 of file bel_debug.h.

Constructor & Destructor Documentation

◆ outputWriter() [1/3]

outputWriter::outputWriter ( std::ostream &  os)
explicit

Outputwriter class will log to debug file, stdout and log file in this order if they have been initialized before.

Definition at line 245 of file bel_debug.cpp.

◆ ~outputWriter()

outputWriter::~outputWriter ( )
override

Definition at line 256 of file bel_debug.cpp.

+ Here is the call graph for this function:

◆ outputWriter() [2/3]

outputWriter::outputWriter ( outputWriter const &  )
delete

◆ outputWriter() [3/3]

outputWriter::outputWriter ( outputWriter &&  )
delete

Member Function Documentation

◆ operator=() [1/2]

outputWriter & outputWriter::operator= ( outputWriter const &  )
delete

◆ operator=() [2/2]

outputWriter & outputWriter::operator= ( outputWriter &&  )
delete

◆ setLevel()

void outputWriter::setLevel ( int const  l)
inline

Definition at line 46 of file bel_debug.h.

Referenced by bGame::DoPerft(), bGame::evalEpdPosition(), bel_debug::execute(), cmd_post::execute(), and cmd_nopost::execute().

+ Here is the caller graph for this function:

◆ getLevel()

int outputWriter::getLevel ( ) const
inline

Definition at line 47 of file bel_debug.h.

Referenced by bGame::DoPerft(), bGame::evalEpdPosition(), and bSearchAlgorithm::StartSearch().

+ Here is the caller graph for this function:

◆ attach()

bool outputWriter::attach ( std::string const &  fn)

Definition at line 260 of file bel_debug.cpp.

Referenced by bel_debug::execute().

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

◆ detach()

void outputWriter::detach ( )

Definition at line 269 of file bel_debug.cpp.

Referenced by bel_debug::execute(), and ~outputWriter().

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

◆ isAttached()

bool outputWriter::isAttached ( ) const
inline

Definition at line 52 of file bel_debug.h.

Referenced by detach(), endl(), and bel_debug::info().

+ Here is the caller graph for this function:

◆ fn()

std::string const & outputWriter::fn ( ) const
inline

Definition at line 53 of file bel_debug.h.

Referenced by attach(), and bel_debug::info().

+ Here is the caller graph for this function:

◆ operator()()

outputWriter & outputWriter::operator() ( int const  l)
inline

Definition at line 55 of file bel_debug.h.

◆ endl()

◆ getOs()

std::ostream & outputWriter::getOs ( )
inline

Definition at line 70 of file bel_debug.h.

◆ getFos()

std::ostream & outputWriter::getFos ( )
inline

Definition at line 71 of file bel_debug.h.

Friends And Related Symbol Documentation

◆ operator<<

template<typename T >
std::ostream & operator<< ( outputWriter log,
o 
)
friend

Definition at line 74 of file bel_debug.h.