中国象棋控件 v2.0.13
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
CPGN类 参考

Class to hold all information for the Portable Game Notation (PGN) of a single game. 更多...

#include <Pgn.h>

Public 成员函数

std::string GetTag (const std::string &szTag)
 
int SetTag (const std::string &szTag, const std::string &szValue)
 
std::string toString () const
 Gets the game as PGN string.
 
int ParseString (const std::string szPgn)
 解析 PGN
 
const std::string & GetEvent () const
 Gets the name of the tournament or match event.
 
int SetEvent (const char *pEvent)
 
const std::string & GetSite () const
 Gets the location of the event.
 
int SetSite (const char *pSite)
 
const time_t & GetDate () const
 Gets the date of the event.
 
int SetDate (const time_t &t)
 
int parseDate (const std::string &dateText)
 
std::string dateToString (const time_t &t) const
 
const std::string & GetRound () const
 Get the playing round ordinal of the game.
 
int SetRound (const char *pRound)
 
const std::string & GetRed () const
 Get the player(s) of the white pieces.
 
int SetRed (const char *pRed)
 
const std::string & GetBlack () const
 Get the player(s) of the black pieces.
 
int SetBlack (const char *pBlack)
 
const std::string & GetResult () const
 Gets the result of the game, if any.
 
int SetResult (const char *pResult)
 
const std::string & GetFen () const
 
int SetFen (const char *pFen)
 
const std::string & GetFormat () const
 
int SetFormat (const char *pFormat)
 
int SetSteps (std::shared_ptr< CChessSteps > steps)
 

详细描述

Class to hold all information for the Portable Game Notation (PGN) of a single game.

参见
http://www.xqbase.com/protocol/cchess_pgn.htm https://www.xqbase.com/protocol/pgnfen1.htm

在文件 Pgn.h22 行定义.

构造及析构函数说明

◆ CPGN()

CPGN::CPGN ( )

在文件 Pgn.cpp6 行定义.

成员函数说明

◆ dateToString()

std::string CPGN::dateToString ( const time_t &  t) const

在文件 Pgn.cpp150 行定义.

◆ GetBlack()

const std::string & CPGN::GetBlack ( ) const

Get the player(s) of the black pieces.

返回
player(s) of the black pieces

在文件 Pgn.cpp189 行定义.

◆ GetDate()

const time_t & CPGN::GetDate ( ) const

Gets the date of the event.

返回
date of the event

在文件 Pgn.cpp130 行定义.

◆ GetEvent()

const std::string & CPGN::GetEvent ( ) const

Gets the name of the tournament or match event.

返回
name of the tournament or match event

在文件 Pgn.cpp108 行定义.

◆ GetFen()

const std::string & CPGN::GetFen ( ) const

在文件 Pgn.cpp214 行定义.

◆ GetFormat()

const std::string & CPGN::GetFormat ( ) const

在文件 Pgn.cpp225 行定义.

◆ GetRed()

const std::string & CPGN::GetRed ( ) const

Get the player(s) of the white pieces.

返回
player(s) of the white pieces

在文件 Pgn.cpp175 行定义.

◆ GetResult()

const std::string & CPGN::GetResult ( ) const

Gets the result of the game, if any.

返回
result of the game

在文件 Pgn.cpp203 行定义.

◆ GetRound()

const std::string & CPGN::GetRound ( ) const

Get the playing round ordinal of the game.

返回
playing round ordinal of the game

在文件 Pgn.cpp164 行定义.

◆ GetSite()

const std::string & CPGN::GetSite ( ) const

Gets the location of the event.

返回
location of the event

在文件 Pgn.cpp119 行定义.

◆ GetTag()

std::string CPGN::GetTag ( const std::string &  szTag)

在文件 Pgn.cpp19 行定义.

◆ parseDate()

int CPGN::parseDate ( const std::string &  dateText)

在文件 Pgn.cpp135 行定义.

◆ ParseString()

int CPGN::ParseString ( const std::string  szPgn)

解析 PGN

参数
szPgn
返回

在文件 Pgn.cpp103 行定义.

◆ SetBlack()

int CPGN::SetBlack ( const char *  pBlack)

在文件 Pgn.cpp194 行定义.

◆ SetDate()

int CPGN::SetDate ( const time_t &  t)

在文件 Pgn.cpp158 行定义.

◆ SetEvent()

int CPGN::SetEvent ( const char *  pEvent)

在文件 Pgn.cpp113 行定义.

◆ SetFen()

int CPGN::SetFen ( const char *  pFen)

在文件 Pgn.cpp219 行定义.

◆ SetFormat()

int CPGN::SetFormat ( const char *  pFormat)

在文件 Pgn.cpp230 行定义.

◆ SetRed()

int CPGN::SetRed ( const char *  pRed)

在文件 Pgn.cpp180 行定义.

◆ SetResult()

int CPGN::SetResult ( const char *  pResult)

在文件 Pgn.cpp208 行定义.

◆ SetRound()

int CPGN::SetRound ( const char *  pRound)

在文件 Pgn.cpp169 行定义.

◆ SetSite()

int CPGN::SetSite ( const char *  pSite)

在文件 Pgn.cpp124 行定义.

◆ SetSteps()

int CPGN::SetSteps ( std::shared_ptr< CChessSteps steps)

在文件 Pgn.cpp239 行定义.

◆ SetTag()

int CPGN::SetTag ( const std::string &  szTag,
const std::string &  szValue 
)

在文件 Pgn.cpp50 行定义.

◆ toString()

std::string CPGN::toString ( ) const

Gets the game as PGN string.

返回
Returns the complete PNG notation for the game.

在文件 Pgn.cpp75 行定义.


该类的文档由以下文件生成: