Tag-free state of a compatibility-aware UUID identity adapter. 更多...
#include <Identity.h>
Public 成员函数 | |
| void | assign (std::string_view text) |
| Assigns from canonical UUID text or from a legacy spelling. | |
静态 Public 成员函数 | |
| static UuidBytes | projectLegacy (std::string_view text) noexcept |
| Builds the deterministic UUID projection of a legacy spelling. | |
Public 属性 | |
| std::string | spelling |
| UuidBytes | uuid {} |
| bool | canonical = false |
详细描述
Tag-free state of a compatibility-aware UUID identity adapter.
Holds exactly what UuidIdAdapter<Tag> held before: the compatibility spelling, the 16-byte canonical projection, and whether the input was canonical UUID text. Keeping the state and its two algorithms here means one copy each instead of one per domain tag; the tagged adapter is a thin wrapper that only re-attaches the tag's UUID type to the accessors.
- 备注
- The layout is unchanged, so the tagged adapter keeps its size and its field order.
在文件 Identity.h 第 87 行定义.
成员函数说明
◆ assign()
| void eve::detail::UuidIdState::assign | ( | std::string_view | text | ) |
Assigns from canonical UUID text or from a legacy spelling.
Canonical text is parsed and remembered as canonical; any other non-empty input is retained verbatim and given a deterministic UUID projection.
- 参数
-
text Input from an editor or compatibility boundary.
在文件 Identity.cpp 第 187 行定义.
引用了 canonical, eve::detail::formatUuidBytes(), eve::detail::parseUuidText(), projectLegacy(), spelling, text , 以及 uuid.
◆ projectLegacy()
|
staticnoexcept |
Builds the deterministic UUID projection of a legacy spelling.
- 参数
-
text Non-empty legacy spelling.
- 返回
- A UUIDv5-shaped, RFC-variant projection of the text.
在文件 Identity.cpp 第 200 行定义.
引用了 bytes, first, second , 以及 text.
被这些函数引用 assign() , 以及 eve::UuidIdAdapter< Tag >::fromLegacy().
类成员变量说明
◆ canonical
| bool eve::detail::UuidIdState::canonical = false |
◆ spelling
| std::string eve::detail::UuidIdState::spelling |
◆ uuid
| UuidBytes eve::detail::UuidIdState::uuid {} |
该类的文档由以下文件生成:
- src/engine/common/Identity.h
- src/engine/common/Identity.cpp