All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Private Attributes | List of all members
osl::record::Record Class Reference

#include <record.h>

Collaboration diagram for osl::record::Record:
Collaboration graph
[legend]

Public Types

enum  ResultType {
  UNKNOWN =0, BLACK_WIN =1, WHITE_WIN =2, SENNNICHITE =3,
  JISHOGI =4
}
 

Public Member Functions

 Record ()
 
 Record (const SimpleState &initial, const vector< Move > &moves)
 
void init ()
 
void setVersion (const std::string &str)
 
const std::string getVersion () const
 
void addInitialComment (const std::string &comment)
 
const std::string getInitialComment () const
 
void setPlayer (Player player, const std::string &str)
 
const std::string & getPlayer (Player player) const
 
void setInitialState (const SimpleState &state)
 
const NumEffectState getInitialState () const
 
int addNodeRecord ()
 
int addMoveRecord (const MoveRecord &moveRecord)
 
NodeRecordnodeOf (int index)
 
NodeRecordoperator[] (int index)
 
MoveRecordmoveOf (int index)
 
void load (IRecordStream &)
 
void save (ORecordStream &)
 
const vector< MovegetMoves () const
 
void getMoves (vector< Move > &, vector< int > &) const
 
void getMoves (vector< Move > &, vector< int > &, vector< std::string > &, vector< SearchInfo > &) const
 
const NodeRecordnodeOf (int index) const
 
const MoveRecordmoveOf (int index) const
 
size_t moveRecordSize () const
 
void setResult (ResultType new_result)
 
ResultType getResult () const
 
void setTounamentName (const std::string &name)
 
const std::string & tounamentName () const
 
void setDate (const std::string &date_str)
 Parse a date_str of YYYY/MM/DD format representing a date. More...
 
void setDate (const boost::gregorian::date &date)
 
boost::gregorian::date getDate () const
 

Private Attributes

SimpleState initialState
 
std::string version
 
std::string initial_comment
 
std::string tounament_name
 
CArray< std::string, 2 > playerNames
 
vector< NodeRecordnrs
 
vector< MoveRecordmrs
 
ResultType result
 
boost::gregorian::date start_date
 

Detailed Description

Definition at line 88 of file record.h.

Member Enumeration Documentation

Enumerator
UNKNOWN 
BLACK_WIN 
WHITE_WIN 
SENNNICHITE 
JISHOGI 

Definition at line 94 of file record.h.

Constructor & Destructor Documentation

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

Definition at line 40 of file record.cc.

osl::record::Record::Record ( const SimpleState &  initial,
const vector< Move > &  moves 
)

Member Function Documentation

void osl::record::Record::addInitialComment ( const std::string &  comment)
inline

Definition at line 115 of file record.h.

Referenced by osl::record::kakinokiParseLine().

int osl::record::Record::addMoveRecord ( const MoveRecord moveRecord)

Definition at line 95 of file record.cc.

int osl::record::Record::addNodeRecord ( )

Definition at line 91 of file record.cc.

boost::gregorian::date osl::record::Record::getDate ( ) const

Definition at line 196 of file record.cc.

Referenced by convert(), run(), and osl::record::KisenIpxWriter::save().

const std::string osl::record::Record::getInitialComment ( ) const
inline

Definition at line 121 of file record.h.

const NumEffectState osl::record::Record::getInitialState ( ) const

Definition at line 82 of file record.cc.

Referenced by main(), osl::record::operator<<(), and osl::record::OKisenStream::save().

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

Definition at line 305 of file record.cc.

void osl::record::Record::getMoves ( vector< Move > &  moves,
vector< int > &  times,
vector< std::string > &  comments,
vector< SearchInfo > &  info 
) const
const std::string & osl::record::Record::getPlayer ( Player  player) const

Definition at line 75 of file record.cc.

Referenced by osl::record::operator<<(), readFile(), and osl::record::KisenIpxWriter::save().

ResultType osl::record::Record::getResult ( ) const
inline

Definition at line 144 of file record.h.

References result.

const std::string osl::record::Record::getVersion ( ) const
inline

Definition at line 114 of file record.h.

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

void osl::record::Record::init ( )

Definition at line 52 of file record.cc.

References osl::HIRATE, and result.

void osl::record::Record::load ( IRecordStream irs)

Definition at line 62 of file record.cc.

References osl::record::IRecordStream::load().

MoveRecord * osl::record::Record::moveOf ( int  index)
const MoveRecord * osl::record::Record::moveOf ( int  index) const

Definition at line 111 of file record.cc.

size_t osl::record::Record::moveRecordSize ( ) const
inline

Definition at line 142 of file record.h.

Referenced by readFile().

NodeRecord * osl::record::Record::nodeOf ( int  index)
const NodeRecord * osl::record::Record::nodeOf ( int  index) const

Definition at line 102 of file record.cc.

References osl::record::NodeRecord::at().

NodeRecord & osl::record::Record::operator[] ( int  index)

Definition at line 117 of file record.cc.

References osl::record::NodeRecord::at().

void osl::record::Record::save ( ORecordStream )

Definition at line 65 of file record.cc.

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

Parse a date_str of YYYY/MM/DD format representing a date.

  • if MM is zero, it becomes January.
  • if DD is zero, it becomes 1st.

Definition at line 120 of file record.cc.

References osl::misc::eucToLang(), K_R1, K_R2, K_R3, K_R4, K_R5, K_R6, K_R7, K_R8, and K_R9.

Referenced by convert(), and osl::record::kakinokiParseLine().

void osl::record::Record::setDate ( const boost::gregorian::date &  date)

Definition at line 192 of file record.cc.

void osl::record::Record::setInitialState ( const SimpleState &  state)

Definition at line 78 of file record.cc.

Referenced by osl::record::kakinokiParseLine().

void osl::record::Record::setPlayer ( Player  player,
const std::string &  str 
)

Definition at line 72 of file record.cc.

Referenced by convert(), and osl::record::kakinokiParseLine().

void osl::record::Record::setResult ( ResultType  new_result)
inline

Definition at line 143 of file record.h.

Referenced by convert(), and osl::record::kakinokiParseLine().

void osl::record::Record::setTounamentName ( const std::string &  name)
inline

Definition at line 145 of file record.h.

Referenced by osl::record::kakinokiParseLine().

void osl::record::Record::setVersion ( const std::string &  str)

Definition at line 69 of file record.cc.

const std::string& osl::record::Record::tounamentName ( ) const
inline

Definition at line 146 of file record.h.

Referenced by convert().

Member Data Documentation

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

Definition at line 103 of file record.h.

SimpleState osl::record::Record::initialState
private

Definition at line 102 of file record.h.

vector<MoveRecord> osl::record::Record::mrs
private

Definition at line 106 of file record.h.

vector<NodeRecord> osl::record::Record::nrs
private

Definition at line 105 of file record.h.

CArray<std::string,2> osl::record::Record::playerNames
private

Definition at line 104 of file record.h.

ResultType osl::record::Record::result
private

Definition at line 107 of file record.h.

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

Definition at line 108 of file record.h.

std::string osl::record::Record::tounament_name
private

Definition at line 103 of file record.h.

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

Definition at line 103 of file record.h.


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