Belofte version 2.1.8
A promising chess program using the UCI or Winboard interface
fen.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------+
2 * File: fen.h
3 * Project: part of belofte - A Promising Chess Program
4 * Author: yves
5 * SPDX-License-Identifier: GPL-2.0-only
6+----------------------------------------------------------------------*/
7
8#if !defined(FEN_H)
9#define FEN_H
10
11//-----------------------------------------------------------------------
12
13/** FEN string */
14class bFen final {
15public:
16 explicit bFen(std::string const& fs);
17 explicit bFen(bFen&& f);
18 ~bFen();
19
20 bFen(bFen const&) = default;
21
22 // no copy or move ctor nor assignment defined
23 bFen& operator=(bFen const&) = delete;
24 bFen& operator=(bFen&&) = delete;
25
26 operator std::string() const& { return const_cast<std::string const&>(m_fen); }
27
28private:
29 friend std::ostream& operator<<(std::ostream& os, bFen const& f);
30
31private:
32 std::string m_fen;
33};
34
35// --------------------------------------------------------------------
36
37#endif // defined FEN_H
38
39// eof
FEN string.
Definition fen.h:14
~bFen()
Definition fen.cpp:23
bFen(bFen const &)=default
bFen & operator=(bFen &&)=delete
friend std::ostream & operator<<(std::ostream &os, bFen const &f)
Definition fen.cpp:27
bFen & operator=(bFen const &)=delete