eis/TestProject/CronTab/CronTab.cc

31 lines
865 B
C++
Raw Normal View History

#include <TestProject/CronTab/CronTab.h>
#include <TestProject/CronTab/CronTab_icei.h>
#include <glob/GlobDefine.h>
#include <utility/IniProperty.h>
#include <memory>
#include <string>
#include "mix_cc/debug/pre_define.h"
using namespace baosight;
CronTab::CronTab() { logger_ = std::make_unique<LOG>("CronTab"); }
CronTab::~CronTab() {}
int CronTab::start() {
logger_->Info() << "-------CronTab::start-------" << std::endl;
try {
auto module_name = name();
CronTab_server = new CronTabICEI();
this->add(string("baosight/") + name(), CronTab_server);
} catch (::Ice::LocalException& e) {
logger_->Error() << "Can not add baosight/CronTab, error: " << e << endl;
return (-1);
}
return 0;
}
// PACE_SERVER_INSTALL(CronTab) //应用程序主入口,传入参数为定义的类名
PACE_PLATFORM_SERVER_INSTALL(CronTab, APPVERSION);