Scid  4.7.0
Classes | Functions
pgnparse.h File Reference

Implements a parser that converts PGN text into SCID's Game objects. More...

#include "common.h"
#include "game.h"
#include "pgn_lexer.h"
#include <string>
#include <vector>
Include dependency graph for pgnparse.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PgnVisitor
 This class implements a PGN "visitor" that invokes the appropriate member functions of the associated Game object for each type of PGN token. More...
 
struct  PgnParseLog
 Format and store errors. More...
 

Functions

bool pgnParseGame (const char *input, size_t inputLen, Game &game, PgnParseLog &log)
 Convert PGN text into a SCID's Game object. More...
 

Detailed Description

Implements a parser that converts PGN text into SCID's Game objects.

Definition in file pgnparse.h.

Function Documentation

◆ pgnParseGame()

bool pgnParseGame ( const char *  input,
size_t  inputLen,
Game game,
PgnParseLog log 
)
inline

Convert PGN text into a SCID's Game object.

Parameters
inputthe memory containing the PGN text.
inputLenthe number of chars in input.
gamethe Game object where the game will be stored. The object is not automatically cleared so that moves can be added to an already existing one.
logstores eventual parsing error.
Returns
true if a game was parsed successfully (maybe with errors, but without ignoring any part), false otherwise.

Definition at line 374 of file pgnparse.h.