Scid  4.7.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Friends | List of all members
PgnVisitor Class Reference

This class implements a PGN "visitor" that invokes the appropriate member functions of the associated Game object for each type of PGN token. More...

#include <pgnparse.h>

Public Member Functions

 PgnVisitor (Game &g)
 
bool visitPGN_inputEOF ()
 
bool visitPGN_inputUnexpectedPGNHeader ()
 
bool visitPGN_Comment (TView comment)
 
bool visitPGN_EndOfLine ()
 
bool visitPGN_EPD (TView line)
 
bool visitPGN_Escape (TView)
 
bool visitPGN_MoveNum (TView)
 
bool visitPGN_NAG (TView token)
 
bool visitPGN_ResultFinal (char resultCh)
 
bool visitPGN_SANMove (TView tok)
 
bool visitPGN_Suffix (TView token)
 
bool visitPGN_TagPair (TView tag, TView value)
 
bool visitPGN_Unknown (TView token)
 
bool visitPGN_VariationStart ()
 
bool visitPGN_VariationEnd ()
 

Friends

struct PgnParseLog
 

Detailed Description

This class implements a PGN "visitor" that invokes the appropriate member functions of the associated Game object for each type of PGN token.

Errors are stored as <line number, error message> pairs; if the maximum number of errors is reached tokens are ignored until the end of the Game.

Definition at line 39 of file pgnparse.h.

Constructor & Destructor Documentation

◆ PgnVisitor()

PgnVisitor::PgnVisitor ( Game g)
inlineexplicit

Definition at line 49 of file pgnparse.h.

Member Function Documentation

◆ visitPGN_Comment()

bool PgnVisitor::visitPGN_Comment ( TView  comment)
inline

Definition at line 66 of file pgnparse.h.

◆ visitPGN_EndOfLine()

bool PgnVisitor::visitPGN_EndOfLine ( )
inline

Definition at line 80 of file pgnparse.h.

◆ visitPGN_EPD()

bool PgnVisitor::visitPGN_EPD ( TView  line)
inline

Definition at line 85 of file pgnparse.h.

◆ visitPGN_Escape()

bool PgnVisitor::visitPGN_Escape ( TView  )
inline

Definition at line 98 of file pgnparse.h.

◆ visitPGN_inputEOF()

bool PgnVisitor::visitPGN_inputEOF ( )
inline

Definition at line 51 of file pgnparse.h.

◆ visitPGN_inputUnexpectedPGNHeader()

bool PgnVisitor::visitPGN_inputUnexpectedPGNHeader ( )
inline

Definition at line 58 of file pgnparse.h.

◆ visitPGN_MoveNum()

bool PgnVisitor::visitPGN_MoveNum ( TView  )
inline

Definition at line 100 of file pgnparse.h.

◆ visitPGN_NAG()

bool PgnVisitor::visitPGN_NAG ( TView  token)
inline

Definition at line 102 of file pgnparse.h.

◆ visitPGN_ResultFinal()

bool PgnVisitor::visitPGN_ResultFinal ( char  resultCh)
inline

Definition at line 113 of file pgnparse.h.

◆ visitPGN_SANMove()

bool PgnVisitor::visitPGN_SANMove ( TView  tok)
inline

Definition at line 139 of file pgnparse.h.

◆ visitPGN_Suffix()

bool PgnVisitor::visitPGN_Suffix ( TView  token)
inline

Definition at line 160 of file pgnparse.h.

◆ visitPGN_TagPair()

bool PgnVisitor::visitPGN_TagPair ( TView  tag,
TView  value 
)
inline

Definition at line 162 of file pgnparse.h.

◆ visitPGN_Unknown()

bool PgnVisitor::visitPGN_Unknown ( TView  token)
inline

Definition at line 182 of file pgnparse.h.

◆ visitPGN_VariationEnd()

bool PgnVisitor::visitPGN_VariationEnd ( )
inline

Definition at line 210 of file pgnparse.h.

◆ visitPGN_VariationStart()

bool PgnVisitor::visitPGN_VariationStart ( )
inline

Definition at line 200 of file pgnparse.h.

Friends And Related Function Documentation

◆ PgnParseLog

friend struct PgnParseLog
friend

Definition at line 46 of file pgnparse.h.


The documentation for this class was generated from the following file: