All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
show-ipx.cc
Go to the documentation of this file.
1 /* show-ipx.cc
2  */
3 #include "osl/record/kisen.h"
4 #include "osl/misc/eucToLang.h"
5 #include <iostream>
6 using namespace osl;
7 
8 int main(int argc, char **argv)
9 {
10  for (int i=1; i<argc; ++i) {
11  KisenIpxFile ipx(argv[i]);
12  for (size_t j=0; j<ipx.size(); ++j) {
13  if (ipx.getStartDate(j).is_special())
14  std::cout << "N/A\t";
15  else
16  std::cout << ipx.getStartDate(j).year() << "\t";
17  std::cout << misc::eucToLang(ipx.getPlayer(j, BLACK)) << "\t"
18  << misc::eucToLang(ipx.getTitle(j, BLACK)) << "\t"
19  << ipx.getRating(j, BLACK) << "\t";
20  std::cout << misc::eucToLang(ipx.getPlayer(j, WHITE)) << "\t"
21  << misc::eucToLang(ipx.getTitle(j, WHITE)) << "\t"
22  << ipx.getRating(j, WHITE) << "\n";
23  }
24  }
25 
26  return 0;
27 }
28 
29 /* ------------------------------------------------------------------------- */
30 // ;;; Local Variables:
31 // ;;; mode:c++
32 // ;;; c-basic-offset:2
33 // ;;; End: