Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef CHESSNOTATION_H
00025 #define CHESSNOTATION_H
00026
00027 #ifndef USE_PCH
00028 #include <iosfwd>
00029 #endif
00030
00031 #include "ChessPosition.h"
00032 #include "Type.h"
00033 #include "Piece.h"
00034 #include "Index.h"
00035 #include "Move.h"
00036
00037 namespace cwchess {
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 class ChessNotation {
00052 private:
00053 ChessPosition const& M_chess_position;
00054 Type const* M_type;
00055 Piece const* M_piece;
00056 Index const* M_index;
00057 Move const* M_move;
00058
00059 public:
00060
00061
00062
00063
00064 ChessNotation(ChessPosition const& chess_position, Piece const& piece) :
00065 M_chess_position(chess_position), M_type(NULL), M_piece(&piece), M_index(NULL), M_move(NULL) { }
00066 ChessNotation(ChessPosition const& chess_position, Index const& index) :
00067 M_chess_position(chess_position), M_type(NULL), M_piece(NULL), M_index(&index), M_move(NULL) { }
00068 ChessNotation(ChessPosition const& chess_position, Move const& move) :
00069 M_chess_position(chess_position), M_type(NULL), M_piece(NULL), M_index(NULL), M_move(&move) { }
00070 ChessNotation(ChessPosition const& chess_position, Type const& type) :
00071 M_chess_position(chess_position), M_type(&type), M_piece(NULL), M_index(NULL), M_move(NULL) { }
00072
00073
00074
00075 public_notdocumented:
00076 void print_on(std::ostream& os, Type const& type) const;
00077 void print_on(std::ostream& os, Piece const& piece) const;
00078 void print_on(std::ostream& os, Index const& index) const;
00079 void print_on(std::ostream& os, Move const& move) const;
00080
00081 friend std::ostream& operator<<(std::ostream& os, ChessNotation const& chess_notation);
00082 };
00083
00084 }
00085
00086 #endif // CHESSNOTATION_H