📄 main.c
字号:
// -*-c++-*-/*************************************************************************** main.cc Main for rcssserver ------------------- begin : 1996 copyright : (C) 1996-2000 Electrotechnical Laboratory. Itsuki Noda, Yasuo Kuniyoshi and Hitoshi Matsubara. (C) 2001-2002 by The RoboCup Soccer Server Maintenance Group. email : sserver-admin@lists.sourceforge.net ***************************************************************************//*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU LGPL as published by the Free Software * * Foundation; either version 2 of the License, or (at your option) any * * later version. * * * ***************************************************************************/#include <iostream>#include <cmath>#include "param.h"#include "types.h"#include "utility.h"#include "object.h"#include "field.h"#include "version.h"#ifdef HAVE_CONFIG_H#include "config.h"#endif#include "timer.h"#include <rcssbase/lib/loader.hpp>#include <rcssbase/version.hpp>#include <dirent.h>#include <sys/types.h>#include <sys/stat.h>#include <unistd.h>Stadium Std ;#include <rcssbase/lib/loader.hpp> int main(int argc, char *argv[]){ std::cout << PACKAGE << "-" << VERSION << std::endl << std::endl << Copyright << std::endl; std::cout << "Using rcssbase-" << rcss::base::version() << std::endl << std::endl;#if defined(_WIN32) || defined(__WIN32__) || defined (WIN32) || defined (__CYGWIN__) std::string config_dir_name = tildeExpand( "~\\.rcssserver" );#else std::string config_dir_name = tildeExpand( "~/.rcssserver" );#endif DIR* config_dir = opendir( config_dir_name.c_str() ); if( config_dir == NULL ) { int err = mkdir( config_dir_name.c_str(), 0777 ); if( err != 0 ) { std::cerr << "Could not read or create config directory '" << config_dir_name << "': " << strerror( errno ) << std::endl; } } ServerParam::init( argc, argv ); Std.init( argc, (const char**)argv ); std::string timername; if( ServerParam::instance().synch_mode ) { timername = "sync"; } else { timername = "std"; } Timer::Creator creator; if( Timer::factory().getCreator( creator, timername.c_str() ) ) { Timer::Ptr timer = creator( Std ); std::cout << "\nHit CTRL-C to exit\n"; timer->run(); } else { std::cerr << "Error: Could not find \"" << timername << "\" timer\n"; } Std.clean (); Std.exit( EXIT_SUCCESS ); return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -