中国象棋控件 2.0.15
载入中...
搜索中...
未找到
Public 成员函数 | Private 属性 | 所有成员列表
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)
 

Private 属性

std::string m_Game
 
std::string m_Event
 
std::string m_Site
 
time_t m_Date
 
std::string m_Round
 
std::string m_Red
 
std::string m_Black
 
std::string m_Result
 
std::string m_szFEN
 
std::string m_Format
 
std::map< std::string, std::string > m_Tags
 
std::shared_ptr< CChessSteps > m_pSteps
 

详细描述

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.h 第 22 行定义.

构造及析构函数说明

◆ CPGN()

CPGN::CPGN ( )

在文件 Pgn.cpp 第 6 行定义.

成员函数说明

◆ dateToString()

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

在文件 Pgn.cpp 第 150 行定义.

◆ GetBlack()

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

Get the player(s) of the black pieces.

返回
player(s) of the black pieces

在文件 Pgn.cpp 第 189 行定义.

◆ GetDate()

const time_t & CPGN::GetDate ( ) const

Gets the date of the event.

返回
date of the event

在文件 Pgn.cpp 第 130 行定义.

◆ GetEvent()

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

Gets the name of the tournament or match event.

返回
name of the tournament or match event

在文件 Pgn.cpp 第 108 行定义.

◆ GetFen()

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

在文件 Pgn.cpp 第 214 行定义.

◆ GetFormat()

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

在文件 Pgn.cpp 第 225 行定义.

◆ GetRed()

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

Get the player(s) of the white pieces.

返回
player(s) of the white pieces

在文件 Pgn.cpp 第 175 行定义.

◆ GetResult()

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

Gets the result of the game, if any.

返回
result of the game

在文件 Pgn.cpp 第 203 行定义.

◆ GetRound()

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

Get the playing round ordinal of the game.

返回
playing round ordinal of the game

在文件 Pgn.cpp 第 164 行定义.

◆ GetSite()

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

Gets the location of the event.

返回
location of the event

在文件 Pgn.cpp 第 119 行定义.

◆ GetTag()

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

在文件 Pgn.cpp 第 19 行定义.

◆ parseDate()

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

在文件 Pgn.cpp 第 135 行定义.

◆ ParseString()

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

解析 PGN

参数
szPgn
返回

在文件 Pgn.cpp 第 103 行定义.

◆ SetBlack()

int CPGN::SetBlack ( const char *  pBlack)

在文件 Pgn.cpp 第 194 行定义.

◆ SetDate()

int CPGN::SetDate ( const time_t &  t)

在文件 Pgn.cpp 第 158 行定义.

◆ SetEvent()

int CPGN::SetEvent ( const char *  pEvent)

在文件 Pgn.cpp 第 113 行定义.

◆ SetFen()

int CPGN::SetFen ( const char *  pFen)

在文件 Pgn.cpp 第 219 行定义.

◆ SetFormat()

int CPGN::SetFormat ( const char *  pFormat)

在文件 Pgn.cpp 第 230 行定义.

◆ SetRed()

int CPGN::SetRed ( const char *  pRed)

在文件 Pgn.cpp 第 180 行定义.

◆ SetResult()

int CPGN::SetResult ( const char *  pResult)

在文件 Pgn.cpp 第 208 行定义.

◆ SetRound()

int CPGN::SetRound ( const char *  pRound)

在文件 Pgn.cpp 第 169 行定义.

◆ SetSite()

int CPGN::SetSite ( const char *  pSite)

在文件 Pgn.cpp 第 124 行定义.

◆ SetSteps()

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

在文件 Pgn.cpp 第 239 行定义.

◆ SetTag()

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

在文件 Pgn.cpp 第 50 行定义.

◆ toString()

std::string CPGN::toString ( ) const

Gets the game as PGN string.

返回
Returns the complete PNG notation for the game.

在文件 Pgn.cpp 第 75 行定义.

类成员变量说明

◆ m_Black

std::string CPGN::m_Black
private

在文件 Pgn.h 第 109 行定义.

◆ m_Date

time_t CPGN::m_Date
private

在文件 Pgn.h 第 106 行定义.

◆ m_Event

std::string CPGN::m_Event
private

在文件 Pgn.h 第 104 行定义.

◆ m_Format

std::string CPGN::m_Format
private

在文件 Pgn.h 第 112 行定义.

◆ m_Game

std::string CPGN::m_Game
private

在文件 Pgn.h 第 103 行定义.

◆ m_pSteps

std::shared_ptr<CChessSteps> CPGN::m_pSteps
private

在文件 Pgn.h 第 115 行定义.

◆ m_Red

std::string CPGN::m_Red
private

在文件 Pgn.h 第 108 行定义.

◆ m_Result

std::string CPGN::m_Result
private

在文件 Pgn.h 第 110 行定义.

◆ m_Round

std::string CPGN::m_Round
private

在文件 Pgn.h 第 107 行定义.

◆ m_Site

std::string CPGN::m_Site
private

在文件 Pgn.h 第 105 行定义.

◆ m_szFEN

std::string CPGN::m_szFEN
private

在文件 Pgn.h 第 111 行定义.

◆ m_Tags

std::map<std::string, std::string> CPGN::m_Tags
private

在文件 Pgn.h 第 113 行定义.


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