libscid 0.1.0
Chess applications made easy.
Loading...
Searching...
No Matches
decode.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018 Fulvio Benini
3 *
4 * This file is part of SCID (Shane's Chess Information Database).
5 *
6 * SCID is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation.
9 *
10 * SCID is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with SCID. If not, see <http://www.gnu.org/licenses/>.
17 *
18 */
19
24#pragma once
25
26#include "scid/core/game.h"
27#include "scid/core/movetext_location.h"
28#include <cstddef>
29#include <string>
30
31namespace scid::core::pgn {
32
36struct ParseLog {
37 std::string log;
38 unsigned long long n_bytes = 0;
39 unsigned long long n_lines = 0;
40 unsigned long long n_games = 0;
41};
42
54bool parseGame(const char* input, size_t inputLen, scid::core::Game& game,
55 ParseLog& log);
56bool parseGame(const char* input, size_t inputLen, scid::core::Game& game,
58
59} // namespace scid::core::pgn
Definition game.h:85
Definition movetext_location.h:11
bool parseGame(const char *input, size_t inputLen, scid::core::Game &game, ParseLog &log)
Convert PGN text into a core Game object.
Format and store errors.
Definition decode.h:36