osl::csa Namespace Reference

CSA形式. More...

## Classes

struct | CsaIOError
class | CsaFileMinimal
class | CsaString

## Functions

const Move | strToMove (const std::string &s, const SimpleState &st)
Player | charToPlayer (char c)
const Square | strToPos (const std::string &s)
Ptype | strToPtype (const std::string &s)
const std::string | show (Move)
const std::string | fancyShow (Move)
const std::string | show (Square)
const std::string | show (Ptype)
const std::string | show (Piece)
const std::string | show (Player)
const std::string | show (const Move *first, const Move *last)
const std::string | show (Move, std::string &buf)
const std::string | show (Square, std::string &buf, size_t offset=0)
const std::string | show (Ptype, std::string &buf, size_t offset=0)
const std::string | show (Player, std::string &buf, size_t offset=0)

## Detailed Description

CSA形式.

CSA形式の定義 http://www.computer-shogi.org/wcsc12/record.html

## Function Documentation

## charToPlayer()

osl::Player osl::csa::charToPlayer | ( | char | c | ) |

Definition at line 17 of file csa.cc.

References osl::BLACK, and osl::WHITE.

Referenced by osl::csa::CsaFileMinimal::parseLine(), osl::record::CsaFile::parseLine(), and strToMove().

## fancyShow()

const std::string osl::csa::fancyShow | ( | Move | move | ) |

Definition at line 140 of file csa.cc.

References osl::Move::capturePtype(), osl::Move::isNormal(), osl::Move::isPromotion(), osl::PTYPE_EMPTY, and show().

## show() [1/10]

const std::string osl::csa::show | ( | const Move * | first,
|  | const Move * | last )

Definition at line 188 of file csa.cc.

References osl::Move::isInvalid(), and show().

## show() [2/10]

const std::string osl::csa::show | ( | Move | move | ) |

Definition at line 132 of file csa.cc.

References show().

Referenced by osl::checkmate::Dfpn::analyze(), osl::move_probability::FeatureSet::analyze(), osl::container::MoveStack::dump(), fancyShow(), osl::record::CsaFile::makeInfo(), osl::operator<<(), show(), show(), show(), show(), show(), show(), show(), osl::record::myshogi::show(), and osl::NumEffectState::showEffect().

## show() [3/10]

const std::string osl::csa::show | ( | Move | move,
|  | std::string & | buf )

Definition at line 87 of file csa.cc.

References osl::Move::DeclareWin(), osl::Move::from(), osl::Move::isInvalid(), osl::Move::isPass(), osl::Move::player(), osl::Move::ptype(), show(), and osl::Move::to().

## show() [4/10]

const std::string osl::csa::show | ( | Piece | piece | ) |

Definition at line 174 of file csa.cc.

References osl::Piece::isEdge(), osl::Piece::isEmpty(), osl::isPiece(), osl::Piece::isPiece(), osl::Piece::number(), osl::Piece::owner(), osl::Piece_Table, osl::Piece::ptype(), show(), and osl::unpromote().

## show() [5/10]

const std::string osl::csa::show | ( | Player | player | ) |

Definition at line 153 of file csa.cc.

References show().

## show() [6/10]

const std::string osl::csa::show | ( | Player | player,
|  | std::string & | buf,
|  | size_t | offset = 0 )

Definition at line 79 of file csa.cc.

References osl::BLACK.

## show() [7/10]

const std::string osl::csa::show | ( | Ptype | ptype | ) |

Definition at line 167 of file csa.cc.

References show().

## show() [8/10]

const std::string osl::csa::show | ( | Ptype | ptype,
|  | std::string & | buf,
|  | size_t | offset = 0 )

Definition at line 122 of file csa.cc.

References osl::Ptype_Table.

## show() [9/10]

const std::string osl::csa::show | ( | Square | position | ) |

Definition at line 160 of file csa.cc.

References show().

## show() [10/10]

const std::string osl::csa::show | ( | Square | pos,
|  | std::string & | buf,
|  | size_t | offset = 0 )

Definition at line 105 of file csa.cc.

References osl::Square::isPieceStand(), osl::Square::x(), and osl::Square::y().

## strToMove()

const osl::Move osl::csa::strToMove | ( | const std::string & | s,
|  | const SimpleState & | st )

Definition at line 47 of file csa.cc.

References charToPlayer(), osl::Move::DeclareWin(), osl::Move::INVALID(), osl::isPromoted(), osl::Move::PASS(), osl::SimpleState::pieceAt(), osl::Piece::ptype(), osl::Square::STAND(), strToPos(), strToPtype(), osl::SimpleState::turn(), and osl::unpromote().

Referenced by osl::record::CsaFile::makeInfo(), and osl::csa::CsaFileMinimal::parseLine().

## strToPos()

const osl::Square osl::csa::strToPos | ( | const std::string & | s | ) |

Definition at line 27 of file csa.cc.

References osl::Square::STAND().

Referenced by osl::csa::CsaFileMinimal::parseLine(), and strToMove().

## strToPtype()

osl::Ptype osl::csa::strToPtype | ( | const std::string & | s | ) |

Definition at line 37 of file csa.cc.

References osl::Ptype_Table.

Referenced by osl::csa::CsaFileMinimal::parseLine(), and strToMove().