-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyHello.cpp
47 lines (41 loc) · 1.1 KB
/
MyHello.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "MyHello.h"
#include "servant/Application.h"
#include "iostream"
#include <vector>
#include <map>
#include <fstream>
#include "tup/tup.h"
using namespace std;
using namespace MyTestApp;
string str2hex(const string& sBuffer)
{
string str = "";
for (size_t i = 0; i < sBuffer.length(); ++i) {
char sb[4] = {0};
snprintf(sb, 4, "%02x", (unsigned char)sBuffer[i]);
if (i%10==0)str.append("\n");
str.append("(byte)0x");
str.append(sb);
str.append(",");
}
return str;
}
//////////////////////////////////////////////////////
void MyHelloImp::initialize()
{
//initialize servant here:
//...
}
1,1 Top
//////////////////////////////////////////////////////
void MyHelloImp::destroy()
{
//destroy servant here:
//...
}
int MyHelloImp::mytest(const std::string & sReq_,std::string &sRsp_,CurrentPtr current)
{
TLOGDEBUG("MyHelloimp::MytestHellosReq:"<<sReq_<<endl);
sRsp_ = sReq_;
return 0;
}