csaLogger.h
Go to the documentation of this file.
00001 /* csaLogger.h
00002  */
00003 #ifndef GAME_PLAYING_CSALOGGER_H
00004 #define GAME_PLAYING_CSALOGGER_H
00005 
00006 #include "osl/player.h"
00007 #include <iosfwd>
00008 namespace osl
00009 {
00010   class Move;
00011   class Sennichite;
00012   namespace state
00013   {
00014     class SimpleState;
00015   }
00016   namespace search
00017   {
00018     struct MoveWithComment;
00019   }
00020   namespace game_playing
00021   {
00022     class TimeKeeper;
00026     class CsaLogger
00027     {
00028       std::ostream& output;
00029     public:
00030       explicit CsaLogger(std::ostream& os);
00031       ~CsaLogger();
00032 
00033       void init(const char *black, const char *white,
00034                 const state::SimpleState& state);
00035       
00036       void pushMove(const Move& move, int seconds);
00037       void pushMove(const search::MoveWithComment& move, int seconds);
00038       void popMove();
00039       void showTimeLeft(const TimeKeeper&);
00040       void writeComment(const char *comment);
00041       void resign(Player resigned);
00042       void inputError(const char *);
00043       void breakGame();
00044       void endByRepetition(const Sennichite&);
00045       void endByDeclaration(Player declarer);
00046     private:
00047       void writeLine(const char *line);
00048       void writeWinner(Player winner);
00049       void writeCurrentDate();
00050     };
00051 
00052   } // namespace game_playing
00053 } // namespace osl
00054 
00055 #endif /* GAME_PLAYING_CSALOGGER_H */
00056 // ;;; Local Variables:
00057 // ;;; mode:c++
00058 // ;;; c-basic-offset:2
00059 // ;;; coding:utf-8
00060 // ;;; End:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines