2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@sns.it>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
18 namespace GamePrivate
{
20 typedef std::map
<int, History
> Variations
;
21 typedef std::map
<int, QString
> VComments
;
28 Variations variations
;
32 Entry(MovePtr move
, PositionPtr position
)
41 /* data and structs for undo */
46 UndoAdd(const Index
& ix
, const Entry
& e
)
47 : index(ix
), entry(e
) {}
54 UndoPromote(const Index
& ix
, int v
)
55 : index(ix
), variation(v
) {}
62 Variations variations
;
64 UndoTruncate(const Index
& ix
)
66 UndoTruncate(const Index
& ix
, const History
& h
,
67 const Variations
& v
, const VComments
& c
)
68 : index(ix
), history(h
), variations(v
), vcomments(c
) {}
77 UndoRemove(const Index
& ix
, int v
, const History
& h
, const QString
& c
)
78 : index(ix
), variation(v
), history(h
), vcomment(c
) {}
83 Variations variations
;
85 UndoClear(const Index
& ix
, const Variations
& v
, const VComments
& c
)
86 : index(ix
), variations(v
), vcomments(c
) {}
89 class UndoSetComment
{
95 UndoSetComment(const Index
& ix
, int v
, const QString
& o
, const QString
& n
)
96 : index(ix
), variation(v
), old_comment(o
), new_comment(n
) {}
101 #endif //__GAME_P_H__