2 Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
10 #ifndef CHESS__MOVESERIALIZER_H
11 #define CHESS__MOVESERIALIZER_H
13 #include <core/component.h>
14 #include <core/move.h>
15 #include <core/moveserializer.h>
23 class TAGUA_EXPORT MoveSerializer
: public Component
, public IMoveSerializer
{
27 virtual QString
suffix(const Move
& move
, const IState
* ref
) const;
29 virtual QString
san(const Move
& move
, const IState
* ref
) const;
31 virtual void minimal_notation(SAN
& san
, const IState
* ref
) const;
33 virtual Move
get_san(const SAN
& san
, const IState
* ref
) const;
35 virtual QChar
symbol(const IType
* type
) const;
37 virtual Move
parse_ics_verbose(const QString
& str
, const IState
* ref
) const;
40 * Create a serializer to a given string representation for moves.
41 * \param rep A move representation type.
43 MoveSerializer(const QString
& rep
);
45 virtual QString
serialize(const Move
& move
, const IState
* ref
) const;
47 virtual Move
deserialize(const QString
& str
, const IState
* ref
) const;
49 virtual QString
type() const;
54 #endif // CHESS__MOVESERIALIZER_H