Class to hold all information for the Portable Game Notation (PGN) of a single game.
更多...
#include <Pgn.h>
|
| 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.h 第 22 行定义.
◆ CPGN()
◆ dateToString()
| std::string CPGN::dateToString |
( |
const time_t & |
t | ) |
const |
◆ 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 |
◆ GetFormat()
| const std::string & CPGN::GetFormat |
( |
| ) |
const |
◆ 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 | ) |
|
◆ parseDate()
| int CPGN::parseDate |
( |
const std::string & |
dateText | ) |
|
◆ ParseString()
| int CPGN::ParseString |
( |
const std::string |
szPgn | ) |
|
◆ SetBlack()
| int CPGN::SetBlack |
( |
const char * |
pBlack | ) |
|
◆ SetDate()
| int CPGN::SetDate |
( |
const time_t & |
t | ) |
|
◆ SetEvent()
| int CPGN::SetEvent |
( |
const char * |
pEvent | ) |
|
◆ SetFen()
| int CPGN::SetFen |
( |
const char * |
pFen | ) |
|
◆ SetFormat()
| int CPGN::SetFormat |
( |
const char * |
pFormat | ) |
|
◆ SetRed()
| int CPGN::SetRed |
( |
const char * |
pRed | ) |
|
◆ SetResult()
| int CPGN::SetResult |
( |
const char * |
pResult | ) |
|
◆ SetRound()
| int CPGN::SetRound |
( |
const char * |
pRound | ) |
|
◆ SetSite()
| int CPGN::SetSite |
( |
const char * |
pSite | ) |
|
◆ SetSteps()
| int CPGN::SetSteps |
( |
std::shared_ptr< CChessSteps > |
steps | ) |
|
◆ SetTag()
| int CPGN::SetTag |
( |
const std::string & |
szTag, |
|
|
const std::string & |
szValue |
|
) |
| |
◆ toString()
| std::string CPGN::toString |
( |
| ) |
const |
Gets the game as PGN string.
- 返回
- Returns the complete PNG notation for the game.
在文件 Pgn.cpp 第 75 行定义.
该类的文档由以下文件生成:
- /home/runner/work/ChineseChessControl/ChineseChessControl/Src/Pgn.h
- /home/runner/work/ChineseChessControl/ChineseChessControl/Src/Pgn.cpp