#include <openingBookConverter.h>
Public Member Functions | |
OpeningBookConverter (const char *filename) | |
~OpeningBookConverter () | |
void | write (const char *filename) |
void | writeInNewFormat (const char *filename) |
void | writeInNewEditFormat (const char *filename) |
Private Member Functions | |
int | readInt (std::ifstream &ifs) |
void | writeInt (std::ofstream &ofs, int n) |
void | writeInNewFormat (std::ofstream &ofs) |
Private Attributes | |
osl::vector< OBState > | states |
osl::vector < osl::record::opening::OBMove > | moves |
Definition at line 23 of file openingBookConverter.h.
OpeningBookConverter::OpeningBookConverter | ( | const char * | filename | ) |
Definition at line 9 of file openingBookConverter.cc.
References osl::Move::makeDirect(), moves, readInt(), osl::record::readInt(), and states.
OpeningBookConverter::~OpeningBookConverter | ( | ) | [inline] |
Definition at line 29 of file openingBookConverter.h.
int OpeningBookConverter::readInt | ( | std::ifstream & | ifs | ) | [private] |
Referenced by OpeningBookConverter().
void OpeningBookConverter::write | ( | const char * | filename | ) |
Definition at line 33 of file openingBookConverter.cc.
References moves, states, and writeInt().
void OpeningBookConverter::writeInNewEditFormat | ( | const char * | filename | ) |
Definition at line 111 of file openingBookConverter.cc.
References osl::record::opening::OBMove::getMove(), OBState::getNOBMove(), OBState::getOBMoveIndex(), osl::record::opening::OBMove::getStateIndex(), osl::HIRATE, moves, states, and writeInNewFormat().
Referenced by main().
void OpeningBookConverter::writeInNewFormat | ( | const char * | filename | ) |
Definition at line 104 of file openingBookConverter.cc.
Referenced by writeInNewEditFormat().
void OpeningBookConverter::writeInNewFormat | ( | std::ofstream & | ofs | ) | [private] |
Definition at line 54 of file openingBookConverter.cc.
References osl::BLACK, OBState::getBlackWinCount(), osl::record::opening::OBMove::getMove(), osl::record::opening::OBMove::getStateIndex(), OBState::getWhiteWinCount(), moves, osl::Move::player(), states, and writeInt().
void OpeningBookConverter::writeInt | ( | std::ofstream & | ofs, |
int | n | ||
) | [private] |
Referenced by write(), and writeInNewFormat().
osl::vector<osl::record::opening::OBMove> OpeningBookConverter::moves [private] |
Definition at line 26 of file openingBookConverter.h.
Referenced by OpeningBookConverter(), write(), writeInNewEditFormat(), and writeInNewFormat().
osl::vector<OBState> OpeningBookConverter::states [private] |
Definition at line 25 of file openingBookConverter.h.
Referenced by OpeningBookConverter(), write(), writeInNewEditFormat(), and writeInNewFormat().