All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Private Attributes
osl::record::KisenIpxFile Class Reference

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

#include <kisen.h>

List of all members.

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
const std::string getPlayer (size_t index, Player pl)
const std::string getTitle (size_t index, Player pl)
unsigned int getRating (size_t index, Player pl)
unsigned int getResult (size_t index)
const std::string & getFileName () const
boost::gregorian::date getStartDate (size_t index)
 開始日の年月日を返す

Private Attributes

std::ifstream ifs
size_t numberOfGames
const std::string file_name

Detailed Description

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

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

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

Definition at line 82 of file kisen.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
BY_PARITY 
BLACK_WIN 
WHITE_WIN 
SENNNICHITE 
JISHOGI 
BLACK_WIN_256 
WHITE_WIN_256 
SENNNICHITE_256 
JISHOGI_256 

Definition at line 87 of file kisen.h.


Constructor & Destructor Documentation

osl::record::KisenIpxFile::KisenIpxFile ( std::string const &  fileName) [explicit]

Definition at line 135 of file kisen.cc.

References ifs, and numberOfGames.

Definition at line 288 of file kisen.cc.


Member Function Documentation

const std::string& osl::record::KisenIpxFile::getFileName ( ) const [inline]

Definition at line 106 of file kisen.h.

References file_name.

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

Definition at line 144 of file kisen.cc.

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

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

Definition at line 158 of file kisen.cc.

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

unsigned int osl::record::KisenIpxFile::getResult ( size_t  index)

Definition at line 169 of file kisen.cc.

References ifs, and size().

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

開始日の年月日を返す

Definition at line 191 of file kisen.cc.

References ifs, and size().

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

Definition at line 177 of file kisen.cc.

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

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

Definition at line 101 of file kisen.h.

References numberOfGames.

Referenced by getPlayer(), getRating(), getResult(), getStartDate(), and getTitle().


Member Data Documentation

const std::string osl::record::KisenIpxFile::file_name [private]

Definition at line 85 of file kisen.h.

Referenced by getFileName().

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

Definition at line 83 of file kisen.h.

Referenced by getPlayer(), getRating(), getResult(), getStartDate(), getTitle(), and KisenIpxFile().

Definition at line 84 of file kisen.h.

Referenced by KisenIpxFile(), and size().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines