eis/TestProject/ProxyTest/ProxyTest.cc

31 lines
899 B
C++
Raw Normal View History

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