Files
spark/src/server/sparkd/main.cpp
T
2017-10-11 18:49:12 +00:00

46 lines
1.2 KiB
C++

#include "lib/os/os.h"
#include "lib/utils/init_spark_lib.h"
#include "lib/logging/logging.h"
#include "server/sparkd/cmds/CmdRegistry.h"
// to add a command add the header here and the the REGISTER call below
// don't touch this file except to add commands.
#include "server/sparkd/cmds/Test.h"
#include "server/sparkd/cmds/Run.h"
#include "server/sparkd/cmds/Help.h"
#include "server/sparkd/cmds/TestOrderman.h"
#include "server/sparkd/cmds/TestCeloxica.h"
#include "server/sparkd/cmds/Md.h"
#include "server/sparkd/cmds/ConfigCheck.h"
#define BEGIN_CMD
#define REGISTER(CMD) bts::cmd::CmdRegistry::register_cmd<bts::cmd::CMD> (#CMD)
#define END_CMD return bts::cmd::CmdRegistry::dispatch (argc,argv)
int main( int argc, const char*argv[] )
{
using namespace bts;
os::set_thread_name("main");
utils::init_spark_lib();
LOG(Gen,Warn,"------------------------------------ Sparkd launched --------------------------------");
BEGIN_CMD;
REGISTER (Test);
REGISTER (Help);
REGISTER (Run);
REGISTER (Md);
REGISTER (TestOrderman);
REGISTER (TestCeloxica);
REGISTER (ConfigCheck);
END_CMD;
utils::finit_spark_lib();
return 0;
}