show-effect.cc
Go to the documentation of this file.
00001 /* show-effect.cc
00002  */
00003 #include "osl/effect_util/effectUtil.h"
00004 #include "osl/record/csaRecord.h"
00005 #include "osl/record/csa.h"
00006 #include <iostream>
00007 #include <cstdio>
00008 using namespace osl;
00009 Square target(5,8);
00010 
00011 int main(int argc, char **argv)
00012 {
00013   // const char *program_name = argv[0];
00014   bool error_flag = false;
00015   bool verbose = false;
00016   
00017   // extern char *optarg;
00018   extern int optind;
00019   char c;
00020   while ((c = getopt(argc, argv, "vh")) != EOF)
00021   {
00022     switch(c)
00023     {
00024     case 'v': verbose = true;
00025       break;
00026     default:    error_flag = true;
00027     }
00028   }
00029   argc -= optind;
00030   argv += optind;
00031 
00032   if (error_flag)
00033     return 1;
00034 
00035   nice(20);
00036       
00037   //次に CSAファイルを処理
00038   for (int i=0; i<argc; ++i)
00039   {
00040     CsaFile file(argv [i]);
00041     NumEffectState state(file.getInitialState());
00042     PieceVector v;
00043     EffectUtil::findEffect(BLACK, state, target, v);
00044     std::cout << v;
00045   }
00046 }
00047 
00048 /* ------------------------------------------------------------------------- */
00049 // ;;; Local Variables:
00050 // ;;; mode:c++
00051 // ;;; c-basic-offset:2
00052 // ;;; End:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines