派生自 development/c++

pansen
2019-03-07 d3b7bbe7102cd089680a828f5d8f6402c8cf6342
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
//
// Created by ps on 18-11-9.
//
 
#ifndef DB_CON_GETUUID_H
#define DB_CON_GETUUID_H
 
 
#include <string>
#include <uuid/uuid.h>
 
class GetUUId {
public:
    static std::string getUUID() {
        std::string str_uuid;
        uuid_t t_uuid;
        char str[36];
        uuid_generate(t_uuid);
        uuid_unparse(t_uuid, str);
        str_uuid = str;
        return str_uuid;
    }
 
};
 
 
#endif //DB_CON_GETUUID_H