osl::record::Record Struct Reference

`#include <record.h>`

## Public Types

enum | ResultType { Unknown =0 , BlackWin =1 , WhiteWin =2 , Sennnichite =3 , JiShogi =4 }

## Public Member Functions

| Record ()
| ~Record ()
NumEffectState | initialState () const
std::vector< Move > | moves () const
void | setDate (const std::string &date_str)
void | setMoveComment (const std::string &)
void | setMoveInfo (const SearchInfo &)
void | setMoveTime (int)
Move | lastMove () const
void | load (std::vector< Move > &moves, std::vector< int > &times) const
void | load (std::vector< Move > &moves, std::vector< int > &times, std::vector< std::string > &comments, std::vector< SearchInfo > &move_info) const

## Static Public Member Functions

static void | addWithNewLine (std::string &a, const std::string &b)

## Public Attributes

RecordMinimal | record
std::vector< int > | times
std::vector< std::string > | comments
std::vector< SearchInfo > | move_info
std::string | version
std::string | initial_comment
std::string | tournament_name
CArray< std::string, 2 > | player
ResultType | result
boost::gregorian::date | start_date

## Detailed Description

Definition at line 14 of file record.h.

## Member Enumeration Documentation

## ResultType

enum osl::record::Record::ResultType

Enumerator
Unknown |
BlackWin |
WhiteWin |
Sennnichite |
JiShogi |

Definition at line 17 of file record.h.

## Constructor & Destructor Documentation

## Record()

osl::record::Record::Record | ( |  | ) |

Definition at line 10 of file record.cc.

References result, and Unknown.

## ~Record()

osl::record::Record::~Record | ( |  | ) |

Definition at line 13 of file record.cc.

## Member Function Documentation

## addWithNewLine()

void osl::record::Record::addWithNewLine | ( | std::string & | a,
|  | const std::string & | b )

inline static

Definition at line 35 of file record.h.

Referenced by osl::record::CsaFile::parseLine(), and setMoveComment().

## initialState()

NumEffectState osl::record::Record::initialState | ( |  | ) | const

inline

Definition at line 40 of file record.h.

References record.

## lastMove()

Move osl::record::Record::lastMove | ( |  | ) | const

inline

Definition at line 47 of file record.h.

References moves().

## load() [1/2]

void osl::record::Record::load | ( | std::vector< Move > & | moves,
|  | std::vector< int > & | times ) const

inline

Definition at line 49 of file record.h.

References moves(), record, and times.

Referenced by load().

## load() [2/2]

void osl::record::Record::load | ( | std::vector< Move > & | moves,
|  | std::vector< int > & | times,
|  | std::vector< std::string > & | comments,
|  | std::vector< SearchInfo > & | move_info ) const

inline

Definition at line 53 of file record.h.

References comments, load(), move_info, moves(), and times.

## moves()

std::vector< Move > osl::record::Record::moves | ( |  | ) | const

inline

Definition at line 41 of file record.h.

References record.

Referenced by lastMove(), load(), load(), setMoveComment(), setMoveInfo(), and setMoveTime().

## setDate()

void osl::record::Record::setDate | ( | const std::string & | date_str | ) |

Definition at line 39 of file record.cc.

References osl::misc::eucToLang(), K_R1, K_R2, K_R3, K_R4, K_R5, K_R6, K_R7, K_R8, K_R9, osl::CArray< T, Capacity >::size(), and start_date.

## setMoveComment()

void osl::record::Record::setMoveComment | ( | const std::string & | msg | ) |

Definition at line 17 of file record.cc.

References addWithNewLine(), comments, initial_comment, and moves().

## setMoveInfo()

void osl::record::Record::setMoveInfo | ( | const SearchInfo & | info | ) |

Definition at line 26 of file record.cc.

References move_info, and moves().

## setMoveTime()

void osl::record::Record::setMoveTime | ( | int | s | ) |

Definition at line 33 of file record.cc.

References moves(), and times.

## Member Data Documentation

## comments

std::vector<std::string> osl::record::Record::comments

Definition at line 25 of file record.h.

Referenced by load(), and setMoveComment().

## initial_comment

std::string osl::record::Record::initial_comment

Definition at line 28 of file record.h.

Referenced by setMoveComment().

## move_info

std::vector<SearchInfo> osl::record::Record::move_info

Definition at line 26 of file record.h.

Referenced by load(), and setMoveInfo().

## player

CArray<std::string,2> osl::record::Record::player

Definition at line 29 of file record.h.

Referenced by osl::record::operator<<().

## record

RecordMinimal osl::record::Record::record

Definition at line 16 of file record.h.

Referenced by initialState(), load(), moves(), and osl::record::operator<<().

## result

ResultType osl::record::Record::result

Definition at line 30 of file record.h.

Referenced by Record().

## start_date

boost::gregorian::date osl::record::Record::start_date

Definition at line 31 of file record.h.

Referenced by setDate().

## times

std::vector<int> osl::record::Record::times

Definition at line 24 of file record.h.

Referenced by load(), load(), and setMoveTime().

## tournament_name

std::string osl::record::Record::tournament_name

Definition at line 28 of file record.h.

## version

std::string osl::record::Record::version

Definition at line 28 of file record.h.

Referenced by osl::record::operator<<().

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

- record.h
- record.cc