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

#include <record.h>

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

List of all members.

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.
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

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.

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().

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<<().

Definition at line 52 of file record.cc.

References osl::HIRATE, and result.

Definition at line 62 of file record.cc.

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

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().

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().

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 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.

Definition at line 106 of file record.h.

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.

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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines