count-win-loss.cc

#include "osl/container/moveVector.h"
#include "osl/record/csaRecord.h"
#include "osl/record/checkDuplicate.h"
#include <boost/algorithm/string/trim.hpp>
#include <boost/functional/hash.hpp>
#include "boost/foreach.hpp"
#include "boost/format.hpp"
#include "boost/multi_array.hpp"
#include <boost/program_options.hpp>
#include <fstream>
#include <iostream>
#include <vector>
count-win-loss.ccのインクルード依存関係図

ソースコードを見る。

型定義

typedef osl::stl::hash_map
< std::string, unsigned int,
boost::hash< std::string > > 
players_t
typedef boost::multi_array
< unsigned int, 4 > 
array_t

列挙型

enum  GameResult {
  BLACK_WIN = 0, WHITE_WIN, OTHERS, BLACK_WIN = 0,
  WHITE_WIN, OTHERS
}

関数

array_t winloss (boost::extents[MAX_PLAYERS][MAX_PLAYERS][2][3])
const std::string & getPlayerName (const unsigned int id)
unsigned int setPlayer (const std::string &player)
void increment (unsigned int black, unsigned int white, GameResult gr)
GameResult getGameResult (const std::string &csa_file, const osl::vector< osl::Move > &moves)
void readFile (const std::string &csa_file, osl::record::CheckDuplicate &duplicates)
void printTotal (std::ostream &out)
void printResult (std::ostream &out)
int main (int argc, char **argv)

変数

static const unsigned int MAX_PLAYERS = 20
 < max players
static players_t players
 player_a, player_b, a's black 0 or white 1, [wins, losses, others]

型定義

typedef boost::multi_array<unsigned int, 4> array_t

count-win-loss.cc23 行で定義されています。

typedef osl::stl::hash_map<std::string, unsigned int, boost::hash<std::string> > players_t

count-win-loss.cc19 行で定義されています。


列挙型

enum GameResult
列挙型の値:
BLACK_WIN 
WHITE_WIN 
OTHERS 
BLACK_WIN 
WHITE_WIN 
OTHERS 

count-win-loss.cc26 行で定義されています。


関数

GameResult getGameResult ( const std::string &  csa_file,
const osl::vector< osl::Move > &  moves 
)

count-win-loss.cc88 行で定義されています。

参照先 BLACK_WIN, OTHERS, と WHITE_WIN.

参照元 readFile().

const std::string& getPlayerName ( const unsigned int  id  ) 

count-win-loss.cc33 行で定義されています。

参照元 printResult(), と printTotal().

void increment ( unsigned int  black,
unsigned int  white,
GameResult  gr 
)

count-win-loss.cc66 行で定義されています。

参照先 BLACK_WIN, OTHERS, WHITE_WIN, と winloss().

参照元 readFile().

int main ( int  argc,
char **  argv 
)
void printResult ( std::ostream &  out  ) 

count-win-loss.cc172 行で定義されています。

参照先 getPlayerName(), と winloss().

参照元 main().

void printTotal ( std::ostream &  out  ) 

count-win-loss.cc140 行で定義されています。

参照先 getPlayerName(), と winloss().

参照元 main().

void readFile ( const std::string &  csa_file,
osl::record::CheckDuplicate duplicates 
)
unsigned int setPlayer ( const std::string &  player  ) 

count-win-loss.cc45 行で定義されています。

参照先 MAX_PLAYERS.

参照元 readFile().

array_t winloss ( boost::extents  [MAX_PLAYERS][MAX_PLAYERS][2][3]  ) 

変数

const unsigned int MAX_PLAYERS = 20 [static]

< max players

player and his/her id

count-win-loss.cc16 行で定義されています。

参照元 setPlayer().

players_t players [static]

player_a, player_b, a's black 0 or white 1, [wins, losses, others]

count-win-loss.cc22 行で定義されています。

 全て クラス ネームスペース ファイル 関数 変数 型定義 列挙型 列挙型の値 フレンド マクロ定義
Sun May 16 09:53:28 2010に生成されました。  doxygen 1.6.3