BIMHome v1.0.0
BIMHome接口文档说明
Uuid.h
浏览该文件的文档.
1/************************************************************************
2* @file Uuid.h
3*
4* @brief 唯一标识符类
5*
6* @details 唯一标识符类
7*
8* @author wukx
9*
10* @version v1.0
11*
12* @date 2016.9.29
13*
14* @license 北京华科软科技有限公司
15*
16*************************************************************************/
17
18#ifndef BIMHOMEBASE_UUID_H
19#define BIMHOMEBASE_UUID_H
20
21// Std. configurations
22
23#include <string>
24#ifndef BH_GLOBAL_H
25#include <BHGlobal.h>
26#endif
27
28namespace Base
29{
30
35 class BaseExport Uuid
36 {
37 public:
43
49 Uuid(const Uuid&) = default;
50
57 Uuid& operator=(const Uuid&) = default;
58
63 virtual ~Uuid();
64
70 void setValue(const char* sString);
71
77 void setValue(const std::string& sString);
78
84 const std::string& getValue() const;
85
91 static std::string createUuid();
92
99 bool operator==(const Uuid& other) const { return _uuid == other._uuid; }
100
107 bool operator<(const Uuid& other) const { return _uuid < other._uuid; }
108
109 private:
110 std::string _uuid;
111 };
112
113} //namespace Base
114
115#endif // BIMHOMEBASE_UUID_H
116
Uuid & operator=(const Uuid &)=default
赋值操作符
Uuid(const Uuid &)=default
复制构造函数
std::string _uuid
UUID 的字符串表示
Definition Uuid.h:110
bool operator==(const Uuid &other) const
等于操作符
Definition Uuid.h:99
bool operator<(const Uuid &other) const
小于操作符
Definition Uuid.h:107
const std::string & getValue() const
获取 UUID 的值
void setValue(const std::string &sString)
设置 UUID 的值
void setValue(const char *sString)
设置 UUID 的值
virtual ~Uuid()
析构函数
Uuid()
默认构造函数
static std::string createUuid()
创建一个新的 UUID
Uuid 类,用于创建和管理通用唯一标识符(UUID)
Definition Uuid.h:36
Definition BaseFigureFactory.h:24