show-ipx.cc
Go to the documentation of this file.
00001 /* show-ipx.cc
00002  */
00003 #include "osl/record/kisen.h"
00004 #include "osl/misc/iconvConvert.h"
00005 #include <iostream>
00006 using namespace osl;
00007 
00008 int main(int argc, char **argv)
00009 {
00010   for (int i=1; i<argc; ++i) {
00011     KisenIpxFile ipx(argv[i]);
00012     for (size_t j=0; j<ipx.size(); ++j) {
00013       if (ipx.getStartDate(j).is_special())
00014         std::cout << "N/A\t";
00015       else
00016         std::cout << ipx.getStartDate(j).year() << "\t";
00017       std::cout << IconvConvert::eucToLang(ipx.getPlayer(j, BLACK)) << "\t" 
00018                 << IconvConvert::eucToLang(ipx.getTitle(j, BLACK)) << "\t"
00019                 << ipx.getRating(j, BLACK) << "\t";
00020       std::cout << IconvConvert::eucToLang(ipx.getPlayer(j, WHITE)) << "\t" 
00021                 << IconvConvert::eucToLang(ipx.getTitle(j, WHITE)) << "\t"
00022                 << ipx.getRating(j, WHITE) << "\n";
00023     }
00024   }
00025 
00026   return 0;
00027 }
00028 
00029 /* ------------------------------------------------------------------------- */
00030 // ;;; Local Variables:
00031 // ;;; mode:c++
00032 // ;;; c-basic-offset:2
00033 // ;;; End:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines