Пример #1
0
 Fixture()
 : gtp_user (gtp), f (1.5), i(-1), s("GTP rulez")
 {
   gtp.Register ("+", CAdd);
   gtp.RegisterStatic ("whoami",    "Santa ");
   gtp.RegisterStatic ("whoami",    "Claus ! ");
   gtp.RegisterStatic ("whoareyou", "Merry");
   gtp.Register ("var_f", Gtp::GetSetCallback (&f));
   gtp.Register ("var_i", Gtp::GetSetCallback (&i));
   gtp.Register ("var_s", Gtp::GetSetCallback (&s));
 }
Пример #2
0
void Admin::Run ()
{
  Gtp::Repl gtp;

  gtp.Register ("add_engine_config_line", this, &Admin::CAddEngineConfigLine);
  gtp.Register ("set_engine_cmd", this, &Admin::CSetEngineCommandLine);
  gtp.Register ("add_engine",     this, &Admin::CAddEngine);

  gtp.Register ("add_game_setup", this, &Admin::CAddGameSetup);

  gtp.Register ("set_experiment_engine", this, &Admin::CSetExperimentEngine);
  gtp.Register ("set_experiment_description", this, &Admin::CSetExperimentDescription);
  gtp.Register ("add_experiment_param", this, &Admin::CAddExperimentParam);
  gtp.Register ("add_experiment", this, &Admin::CAddExperiment);
  gtp.Register ("close_all_experiments", this, &Admin::CCloseAllExperiments);

  gtp.Register ("loop_add_games", this, &Admin::CLoopAddGames);

  gtp.Register ("extract_csv", this, &Admin::CExtractCsv);

  gtp.Run (std::cin, std::cout);
}
Пример #3
0
 DummyGtpUser (Gtp::Repl& gtp) {
   gtp.Register ("echo",  this, &DummyGtpUser::CEcho);
   gtp.Register ("echo2", this, &DummyGtpUser::CEcho);
   gtp.Register ("echo2", this, &DummyGtpUser::CEcho);
 }