My Project
Public Types | Public Member Functions | Private Attributes | List of all members
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の固定長が並ぶファイル。

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 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 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 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.

◆ size()

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

Definition at line 86 of file kisen.h.

References number_of_games.

◆ startDate()

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

開始日の年月日を返す

Definition at line 183 of file kisen.cc.

◆ title()

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

Definition at line 170 of file kisen.cc.

References 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().

◆ ifs

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

Definition at line 68 of file kisen.h.

Referenced by KisenIpxFile().

◆ 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: