OChess v0.0.2
Programmer's Manual
PGNGameBase Class Reference

Used to open PGN files. More...

#include <PGNGameBase.hpp>

Inheritance diagram for PGNGameBase:
GameBase

Public Member Functions

 PGNGameBase (std::string pgn_file)
 
std::shared_ptr< GameGetGame (std::uint32_t id)
 
bool NextGame ()
 
std::shared_ptr< GameGetCurrentGame ()
 
std::string GetTag (std::string tag)
 
void Save (std::vector< std::uint32_t > to_delete, std::vector< std::string > databases_to_import, std::vector< std::shared_ptr< Game > > games_to_import)
 
void Reset ()
 
void Export (std::shared_ptr< GameBase > base)
 Save the given base into current base format (export) More...
 
std::string GetFormat ()
 
std::string GetFilePath ()
 
virtual std::shared_ptr< GameGetGame (std::uint32_t id)=0
 
virtual void Save (std::vector< std::uint32_t > to_delete, std::vector< std::string > databases_to_import, std::vector< std::shared_ptr< Game > > games_to_import)=0
 
virtual std::shared_ptr< GameGetCurrentGame ()=0
 
virtual bool NextGame ()=0
 
virtual std::string GetTag (std::string tag)=0
 
virtual void Reset ()=0
 
virtual std::string GetFormat ()=0
 
virtual std::string GetFilePath ()=0
 
virtual void Export (std::shared_ptr< GameBase > base)=0
 Save the given base into current base format (export) More...
 

Static Public Member Functions

static std::string GetMovesPGN (HalfMove *m, bool needDots)
 
static std::string GetPGN (std::shared_ptr< Game > g)
 
static void CreateDatabaseFile (std::string path)
 

Private Attributes

pgnp::PGN * pgn
 
bool hasNextGame
 
std::string file
 

Detailed Description

Used to open PGN files.

Member Function Documentation

◆ Export()

void PGNGameBase::Export ( std::shared_ptr< GameBase base)
virtual

Save the given base into current base format (export)

Parameters
base

Implements GameBase.

◆ GetCurrentGame()

std::shared_ptr< Game > PGNGameBase::GetCurrentGame ( )
virtual

Implements GameBase.

◆ GetFilePath()

std::string PGNGameBase::GetFilePath ( )
inlinevirtual

Implements GameBase.

◆ GetFormat()

std::string PGNGameBase::GetFormat ( )
inlinevirtual

Implements GameBase.

◆ GetGame()

std::shared_ptr< Game > PGNGameBase::GetGame ( std::uint32_t  id)
virtual

Implements GameBase.

◆ GetTag()

std::string PGNGameBase::GetTag ( std::string  tag)
virtual

Implements GameBase.

◆ NextGame()

bool PGNGameBase::NextGame ( )
virtual

Implements GameBase.

◆ Reset()

void PGNGameBase::Reset ( )
virtual

Implements GameBase.

◆ Save()

void PGNGameBase::Save ( std::vector< std::uint32_t >  to_delete,
std::vector< std::string >  databases_to_import,
std::vector< std::shared_ptr< Game > >  games_to_import 
)
virtual

Implements GameBase.


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