osl::record::KisenIpxFile Class Reference

「.ipx」という拡張子を持つ棋泉形式ファイル. More...

`#include <kisen.h>`

## Public Types

enum | { BY_PARITY =0 , BLACK_WIN =1 , WHITE_WIN =2 , SENNNICHITE =3 , JISHOGI =4 , BLACK_WIN_256 =5 , WHITE_WIN_256 =6 , SENNNICHITE_256 =7 , JISHOGI_256 =8 }

## Public Member Functions

| KisenIpxFile (std::string const &filename)
| ~KisenIpxFile ()
size_t | size () const
std::string | player (size_t index, Player pl)
std::string | title (size_t index, Player pl)
unsigned int | rating (size_t index, Player pl)
unsigned int | result (size_t index)
const std::string & | fileName () const
boost::gregorian::date | startDate (size_t index)
| 開始日の年月日を返す

## Private Attributes

std::ifstream | ifs
size_t | number_of_games
const std::string | file_name

## Detailed Description

「.ipx」という拡張子を持つ棋泉形式ファイル.

対局者に関する情報(「プレイヤー名」，「レーティング」) が分かっている．

1 record = 256Bytesの固定長が並ぶファイル。

- 001-014: 先手 名前 [14]
- 015-028: 後手 名前 [14]
- 029-036: 先手 肩書き [8]
- 037-044: 後手 肩書き [8]
- 045-084: unknown
- 085-090: 開始日の年月日時分 [6]
  - 085-086: 開始日の年 [2]
  - 087 : 月 [1]
  - 088 : 日 [1]
  - 089 : 時 [1]
  - 090 : 分 [1]
- 091-096: 終了 年月日時分 [6]
- 097-118: unknown
- 119 : 結果フラグ [1]
- 120-212: unknown
- 213-214: 先手rating [2]
- 215-216: 後手rating [2]
- 217-256: unknown

Definition at line 67 of file kisen.h.

## Member Enumeration Documentation

## anonymous enum

anonymous enum

Enumerator
BY_PARITY |
BLACK_WIN |
WHITE_WIN |
SENNNICHITE |
JISHOGI |
BLACK_WIN_256 |
WHITE_WIN_256 |
SENNNICHITE_256 |
JISHOGI_256 |

Definition at line 72 of file kisen.h.

## Constructor & Destructor Documentation

## KisenIpxFile()

osl::record::KisenIpxFile::KisenIpxFile | ( | std::string const & | filename | ) |

explicit

Definition at line 130 of file kisen.cc.

References file_name, ifs, and number_of_games.

## ~KisenIpxFile()

osl::record::KisenIpxFile::~KisenIpxFile | ( |  | ) |

Definition at line 277 of file kisen.cc.

## Member Function Documentation

## fileName()

const std::string & osl::record::KisenIpxFile::fileName | ( |  | ) | const

inline

Definition at line 91 of file kisen.h.

References file_name.

## player()

std::string osl::record::KisenIpxFile::player | ( | size_t | index,
|  | Player | pl )

Definition at line 139 of file kisen.cc.

References ifs, size(), osl::misc::sjis2euc(), and osl::WHITE.

## rating()

unsigned int osl::record::KisenIpxFile::rating | ( | size_t | index,
|  | Player | pl )

Definition at line 152 of file kisen.cc.

References ifs, size(), and osl::WHITE.

Referenced by osl::rating::BradleyTerry::accumulate().

## result()

unsigned int osl::record::KisenIpxFile::result | ( | size_t | index | ) |

Definition at line 162 of file kisen.cc.

References ifs, and size().

## size()

size_t osl::record::KisenIpxFile::size | ( |  | ) | const

inline

Definition at line 86 of file kisen.h.

References number_of_games.

Referenced by player(), rating(), result(), startDate(), and title().

## startDate()

boost::gregorian::date osl::record::KisenIpxFile::startDate | ( | size_t | index | ) |

開始日の年月日を返す

Definition at line 183 of file kisen.cc.

References ifs, and size().

## title()

std::string osl::record::KisenIpxFile::title | ( | size_t | index,
|  | Player | pl )

Definition at line 170 of file kisen.cc.

References ifs, size(), osl::misc::sjis2euc(), and osl::WHITE.

## Member Data Documentation

## file_name

const std::string osl::record::KisenIpxFile::file_name

private

Definition at line 70 of file kisen.h.

Referenced by fileName(), and KisenIpxFile().

## ifs

std::ifstream osl::record::KisenIpxFile::ifs

private

Definition at line 68 of file kisen.h.

Referenced by KisenIpxFile(), player(), rating(), result(), startDate(), and title().

## number_of_games

size_t osl::record::KisenIpxFile::number_of_games

private

Definition at line 69 of file kisen.h.

Referenced by KisenIpxFile(), and size().

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

- kisen.h
- kisen.cc