csa-to-kisen.cc File Reference

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Functions | Variables
csa-to-kisen.cc File Reference
`#include "osl/container/moveVector.h"`
`#include "osl/hash/hashKey.h"`
`#include "osl/state/numEffectState.h"`
`#include "osl/record/ki2.h"`
`#include "osl/record/kisen.h"`
`#include "osl/record/kakinoki.h"`
`#include "osl/record/csaRecord.h"`
`#include "osl/record/checkDuplicate.h"`
`#include "osl/record/csaIOError.h"`
`#include "osl/record/kanjiCode.h"`
`#include "osl/misc/filePath.h"`
`#include <boost/algorithm/string/predicate.hpp>`
`#include <boost/algorithm/string/trim.hpp>`
`#include <boost/date_time/gregorian/gregorian.hpp>`
`#include <boost/scoped_ptr.hpp>`
`#include <boost/program_options.hpp>`
`#include <boost/filesystem/convenience.hpp>`
`#include <boost/foreach.hpp>`
`#include <boost/format.hpp>`
`#include <boost/progress.hpp>`
`#include <boost/regex.hpp>`
`#include <deque>`
`#include <exception>`
`#include <iostream>`
`#include <fstream>`
`#include <tr1/unordered_map>`
Include dependency graph for csa-to-kisen.cc:

Go to the source code of this file.

## Functions
bool | accept_tournament (const std::string &name)
std::string | heuristic_find_title (osl::Record &record, osl::Player player)
void | run (osl::record::Record &record, osl::record::OKisenStream &ks, boost::scoped_ptr< osl::record::KisenIpxWriter > &ipx_writer, osl::record::CheckDuplicate &check_duplicates, int default_rating, int min_year, int max_year)
static void | convert (const std::string &kisen_filename, const std::vector< std::string > &files, bool output_ipx, osl::record::CheckDuplicate &check_duplicates, int default_rating, int min_year, int max_year)
int | main (int argc, char **argv)

## Variables
std::vector< std::string > | good_tournaments

## Function Documentation

bool accept_tournament | ( | const std::string & | name) |  |

Definition at line 31 of file csa-to-kisen.cc.

References good_tournaments.

Referenced by convert().

static void convert | ( | const std::string & | kisen_filename,
|  | const std::vector< std::string > & | files,
|  | bool | output_ipx,
|  | osl::record::CheckDuplicate & | check_duplicates,
|  | int | default_rating,
|  | int | min_year,
|  | int | max_year
| ) |  |
| static

Definition at line 90 of file csa-to-kisen.cc.

References accept_tournament(), osl::BLACK, osl::misc::file_string(), osl::record::Record::getDate(), osl::record::csa::CsaFile::getRecord(), run(), osl::record::Record::setDate(), osl::record::Record::setPlayer(), osl::record::Record::tounamentName(), and osl::WHITE.

std::string heuristic_find_title | ( | osl::Record & | record,
|  | osl::Player | player
| ) |  |

Definition at line 42 of file csa-to-kisen.cc.

References K_DAN, K_JORYUU, K_K1, K_K2, K_K3, K_K4, K_K5, K_K6, K_K7, K_K8, K_K9, K_KANMURI, K_KI, K_KING2, K_KURAI, K_MEIJIN, K_PROOK2, K_SEI, K_SHOU, and K_ZA.

Referenced by run().

int main | ( | int | argc,
|  | char ** | argv
| ) |  |

Definition at line 185 of file csa-to-kisen.cc.

References check_duplicate, osl::eval::convert(), files, good_tournaments, kisen_filename, osl::record::CheckDuplicate::print(), run(), store(), and vm.

void run | ( | osl::record::Record & | record,
|  | osl::record::OKisenStream & | ks,
|  | boost::scoped_ptr< osl::record::KisenIpxWriter > & | ipx_writer,
|  | osl::record::CheckDuplicate & | check_duplicates,
|  | int | default_rating,
|  | int | min_year,
|  | int | max_year
| ) |  |

Definition at line 65 of file csa-to-kisen.cc.

References osl::BLACK, osl::record::Record::getDate(), osl::record::Record::getMoves(), heuristic_find_title(), moves, osl::record::CheckDuplicate::regist(), osl::record::OKisenStream::save(), and osl::WHITE.

## Variable Documentation

std::vector<std::string> good_tournaments

Definition at line 30 of file csa-to-kisen.cc.

Referenced by accept_tournament(), and main().