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)); }
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); }
DummyGtpUser (Gtp::Repl& gtp) { gtp.Register ("echo", this, &DummyGtpUser::CEcho); gtp.Register ("echo2", this, &DummyGtpUser::CEcho); gtp.Register ("echo2", this, &DummyGtpUser::CEcho); }