osl::record Namespace Reference

- Main Page
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Namespaces | Classes | Enumerations | Functions
osl::record Namespace Reference

棋譜関係 More...

## Namespaces
| csa
| CSA形式.
| kakinoki
| ki2
| myshogi
| opening
| 定跡
| psn
| gnushogi で使われるフォーマット.
| usi

## Classes
class | CheckDuplicate
| Container of moves to check duplicated games. More...
class | OPiece
class | CompactBoard
| SimpleStateよりcompactな局面の表現 More...
class | KanjiMove
| Parse kanji records such as "７六歩", the style of which is generally used to write Shogi records in Japanese. More...
class | Color
| カラーコードを保持するクラス。 More...
class | ChangeShellColor
| shellの文字出力にて、色を変える。 More...
class | Characters
| 駒の文字を管理するAbstract class。 More...
struct | StandardCharacters
| 持ち駒用（標準文字） More...
struct | RussianCharacters
| ロシア文字（激指フォント用） More...
struct | KIFCharacters
| 柿木形式（KIF）。頭にv More...
class | KanjiPrint
| 局面を漢字でカラーで表示する. More...
class | KisenUtils
class | IKisenStream
class | KisenFile
| 「.kif」という拡張子を持つ棋泉形式ファイル. More...
class | KisenIpxFile
| 「.ipx」という拡張子を持つ棋泉形式ファイル. More...
class | KisenPlusFile
| 「.kpf」という拡張子を持つ棋泉プラス形式ファイル. More...
class | OKisenStream
class | KisenIpxWriter
| 「.ipx」という拡張子を持つ棋泉形式ファイル. More...
class | OSquare
| Square, Owner: 9 bits. More...
class | OPSquare
| Square, Owner, Promoted : 10 bits. More...
class | MiniBoard
| More compact board than CompactBoard. More...
class | MiniBoardChar50
| 50 byte の盤面. More...
class | IRecordStream
class | ORecordStream
class | MoveRecord
| とりあえず tree を表現できるようにする． 合流は考えない． 所詮，出すのは CSA かGCF More...
class | NodeRecord
class | Record
class | RecordVisitorObserver
class | RecordVisitor
struct | SearchInfo
struct | opiece_sort
struct | oposition_sort

## Enumerations
enum | NodeType { MOVE, TORYO, MATTA, CHUDAN, SENNICHITE, JISHOGI, TSUMI, FUZUMI, ND_ERROR, KACHI, HIKIWAKE }

## Functions
bool | operator== (const CompactBoard &, const CompactBoard &)
| 局面を比較する. More...
std::ostream & | operator<< (std::ostream &os, const CompactBoard &c)
std::istream & | operator>> (std::istream &os, CompactBoard &c)
std::ostream & | operator<< (std::ostream &os, const Color &c)
std::string | kanjiNumber (const int n)
| 漢数字を返す（持ち駒の数などで用いる） More...
bool | operator< (const MiniBoardChar50 &, const MiniBoardChar50 &)
bool | operator== (const MiniBoardChar50 &, const MiniBoardChar50 &)
std::ostream & | operator<< (std::ostream &, const MoveRecord &)
std::ostream & | operator<< (std::ostream &, Record &)
int | readInt (std::istream &is)
void | writeInt (std::ostream &os, int n)
void | kakinokiParseLine (boost::shared_ptr< RecordVisitor > &rv, std::string s, CArray< bool, 9 > &board_parsed)
int | fromBase64 (const std::string &base64, MiniBoard &mb)

## Detailed Description

棋譜関係

## Enumeration Type Documentation

enum osl::record::NodeType

Enumerator
MOVE |
TORYO |
MATTA |
CHUDAN |
SENNICHITE |
JISHOGI |
TSUMI |
FUZUMI |
ND_ERROR |
KACHI |
HIKIWAKE |

Definition at line 30 of file record.h.

## Function Documentation

int osl::record::fromBase64 | ( | const std::string & | base64,
|  | MiniBoard & | mb
| ) |  |

Returns
  0 (success); non-zero (failure)

Definition at line 257 of file miniBoard.cc.

References osl::misc::base64Decode(), osl::record::MiniBoard::bishop_pieces, osl::BLACK, osl::record::MiniBoard::gold_pieces, osl::record::MiniBoard::king_pieces, osl::record::MiniBoard::knight_pieces, osl::record::MiniBoard::lance_pieces, osl::record::MiniBoard::pawn_pieces, osl::record::MiniBoard::rook_pieces, osl::record::MiniBoard::silver_pieces, osl::record::OSquare::total_bits, osl::record::OPSquare::total_bits, osl::record::MiniBoard::total_bits, osl::record::MiniBoard::turn, and osl::WHITE.

void osl::record::kakinokiParseLine | ( | boost::shared_ptr< RecordVisitor > & | rv,
|  | std::string | s,
|  | CArray< bool, 9 > & | board_parsed
| ) |  |

Definition at line 25 of file kakinoki.cc.

References osl::record::MoveRecord::addComment(), osl::record::Record::addInitialComment(), osl::BLACK, osl::record::Record::BLACK_WIN, osl::misc::eucToLang(), osl::find(), osl::HIRATE, osl::record::KanjiMove::instance(), osl::Move::isNormal(), osl::isPiece(), K_BLACK, K_COLON, K_K1, K_K10, K_K2, K_K3, K_K4, K_K5, K_K6, K_K7, K_K8, K_K9, K_KAISHI, K_KISEN, K_MOCHIGOMA, K_NASHI, K_NICHIJI, K_SPACE, K_TESUU, K_TORYO, K_WHITE, osl::record::Record::setDate(), osl::record::Record::setInitialState(), osl::record::Record::setPlayer(), osl::record::Record::setResult(), osl::record::Record::setTounamentName(), osl::Square::STAND(), osl::record::kakinoki::strToMove(), osl::record::kakinoki::strToPiece(), osl::record::KanjiMove::toPtype(), osl::WHITE, and osl::record::Record::WHITE_WIN.

Referenced by osl::record::kakinoki::InputStream::load().

std::string osl::record::kanjiNumber | ( | const int | n) |  |

漢数字を返す（持ち駒の数などで用いる）

Definition at line 74 of file kanjiPrint.cc.

References K_K1, K_K10, K_K11, K_K12, K_K13, K_K14, K_K15, K_K16, K_K17, K_K18, K_K2, K_K3, K_K4, K_K5, K_K6, K_K7, K_K8, and K_K9.

bool osl::record::operator< | ( | const MiniBoardChar50 & | l,
|  | const MiniBoardChar50 & | r
| ) |  |

Definition at line 77 of file miniBoardChar50.cc.

References osl::record::MiniBoardChar50::data.

std::ostream & osl::record::operator<< | ( | std::ostream & | os,
|  | const Color & | c
| ) |  |

Definition at line 161 of file kanjiPrint.cc.

References osl::record::Color::value.

std::ostream & osl::record::operator<< | ( | std::ostream & | os,
|  | const CompactBoard & | c
| ) |  |

Definition at line 102 of file compactBoard.cc.

References osl::record::CompactBoard::pieces, osl::record::CompactBoard::turn(), and writeInt().

std::ostream & osl::record::operator<< | ( | std::ostream & | os,
|  | const MoveRecord & | mr
| ) |  |

Definition at line 221 of file record.cc.

References osl::record::MoveRecord::getNodeIndex().

std::ostream & osl::record::operator<< | ( | std::ostream & | os,
|  | Record & | r
| ) |  |

Definition at line 226 of file record.cc.

References osl::record::NodeRecord::at(), osl::BLACK, osl::record::MoveRecord::getComment(), osl::record::Record::getInitialState(), osl::record::MoveRecord::getMove(), osl::record::RecordVisitor::getNode(), osl::record::MoveRecord::getNodeIndex(), osl::record::Record::getPlayer(), osl::record::MoveRecord::getTime(), osl::record::Record::getVersion(), osl::record::Record::moveOf(), osl::record::Record::nodeOf(), osl::record::RecordVisitor::setRecord(), osl::record::RecordVisitor::setState(), osl::record::NodeRecord::size(), and osl::WHITE.

bool osl::record::operator== | ( | const MiniBoardChar50 & | l,
|  | const MiniBoardChar50 & | r
| ) |  |

Definition at line 82 of file miniBoardChar50.cc.

References osl::record::MiniBoardChar50::data.

bool osl::record::operator== | ( | const CompactBoard & | lhs,
|  | const CompactBoard & | rhs
| ) |  |

局面を比較する.

将棋としての局面（手番や持ち駒を含む）を比較する. NumEffectState等と異なり駒番号は考慮されない.

Definition at line 96 of file compactBoard.cc.

References osl::record::CompactBoard::pieces, and osl::record::CompactBoard::turn().

std::istream & osl::record::operator>> | ( | std::istream & | os,
|  | CompactBoard & | c
| ) |  |

Definition at line 114 of file compactBoard.cc.

References osl::record::CompactBoard::pieces, osl::record::CompactBoard::player_to_move, and readInt().

int osl::record::readInt | ( | std::istream & | is) |  |

Definition at line 260 of file record.cc.

Referenced by osl::record::opening::WeightedBook::getBlackWinCount(), osl::record::opening::WinCountBook::getLoseCount(), osl::record::opening::WinCountBook::getMoves(), osl::record::opening::WeightedBook::getMoves(), osl::record::opening::WeightedBook::getWhiteWinCount(), osl::record::opening::WinCountBook::getWinCount(), OpeningBookConverter::OpeningBookConverter(), operator>>(), osl::record::opening::operator>>(), osl::record::CompactBoard::toBase64(), and osl::record::opening::WeightedBook::WeightedBook().

void osl::record::writeInt | ( | std::ostream & | os,
|  | int | n
| ) |  |

Definition at line 272 of file record.cc.

Referenced by osl::record::CompactBoard::fromBase64(), operator<<(), osl::record::opening::operator<<(), OpeningBookConverter::write(), and OpeningBookConverter::writeInNewFormat().