UUID-backed identifier adapter for legacy textual boundaries. 更多...
#include <Identity.h>
Public 类型 | |
| using | Uuid = StrongUuid< Tag > |
| using | Bytes = typename Uuid::Bytes |
Public 成员函数 | |
| UuidIdAdapter ()=default | |
| Constructs an empty compatibility identifier. | |
| UuidIdAdapter (const char *value) | |
| Constructs from a legacy spelling or canonical UUID text. | |
| UuidIdAdapter (std::string value) | |
| Constructs from a legacy spelling or canonical UUID text. | |
| UuidIdAdapter (std::string_view value) | |
| Constructs from a legacy spelling or canonical UUID text. | |
| const std::string & | value () const noexcept |
| Returns the exact legacy or canonical compatibility spelling. | |
| const std::string & | format () const noexcept |
| Returns the compatibility spelling; use canonicalFormat at persistence boundaries. | |
| Uuid | uuid () const noexcept |
| Returns the canonical UUID projection. | |
| std::string | canonicalFormat () const |
| Returns the canonical UUID projection as lower-case UUID text. | |
| bool | empty () const noexcept |
| True when no compatibility spelling has been assigned. | |
| bool | isNil () const noexcept |
| True when the value is an empty or UUID nil identity. | |
| bool | isCanonicalUuid () const noexcept |
| True when the input was canonical UUID text rather than legacy text. | |
| std::uint64_t | hash () const noexcept |
| Stable hash of the canonical UUID projection. | |
| operator bool () const noexcept | |
| Explicit boolean check for a non-empty identifier. | |
静态 Public 成员函数 | |
| static std::optional< UuidIdAdapter > | parse (std::string_view value) |
| Parses canonical UUID text or a non-empty legacy spelling. | |
| static UuidIdAdapter | fromUuid (Uuid value) |
| Builds an adapter from an explicit canonical UUID. | |
| static UuidIdAdapter | fromLegacy (std::string value) |
| Builds an adapter while explicitly retaining a legacy spelling. | |
友元 | |
| bool | operator== (const UuidIdAdapter &lhs, const UuidIdAdapter &rhs) noexcept |
| Operator ==. | |
| auto | operator<=> (const UuidIdAdapter &lhs, const UuidIdAdapter &rhs) noexcept |
| Orders adapter values by their canonical UUID projection. | |
详细描述
class eve::UuidIdAdapter< Tag >
UUID-backed identifier adapter for legacy textual boundaries.
- 模板参数
-
Tag Domain tag for the canonical UUID projection.
New values are represented by a common strong UUID. A non-UUID, non-empty constructor or parse input is retained verbatim as a compatibility spelling and receives a deterministic UUID projection for hashing, ordering and explicit cross-boundary conversion. This lets old editor logical IDs keep working without introducing another string-identity implementation.
The legacy spelling is not a persistent UUID. Persistence code must use uuid()/canonicalFormat() and declare its schema migration policy.
UuidIdAdapter public API.
在文件 Identity.h 第 314 行定义.
成员类型定义说明
◆ Bytes
| using eve::UuidIdAdapter< Tag >::Bytes = typename Uuid::Bytes |
在文件 Identity.h 第 317 行定义.
◆ Uuid
| using eve::UuidIdAdapter< Tag >::Uuid = StrongUuid<Tag> |
在文件 Identity.h 第 316 行定义.
构造及析构函数说明
◆ UuidIdAdapter() [1/4]
|
default |
Constructs an empty compatibility identifier.
被这些函数引用 eve::UuidIdAdapter< Tag >::parse().
◆ UuidIdAdapter() [2/4]
|
inlineexplicit |
Constructs from a legacy spelling or canonical UUID text.
在文件 Identity.h 第 323 行定义.
◆ UuidIdAdapter() [3/4]
|
inlineexplicit |
Constructs from a legacy spelling or canonical UUID text.
在文件 Identity.h 第 326 行定义.
◆ UuidIdAdapter() [4/4]
|
inlineexplicit |
Constructs from a legacy spelling or canonical UUID text.
在文件 Identity.h 第 329 行定义.
引用了 eve::detail::UuidIdState::assign() , 以及 eve::UuidIdAdapter< Tag >::value().
成员函数说明
◆ canonicalFormat()
|
inline |
Returns the canonical UUID projection as lower-case UUID text.
在文件 Identity.h 第 371 行定义.
引用了 eve::detail::formatUuidBytes() , 以及 eve::detail::UuidIdState::uuid.
◆ empty()
|
inlinenoexcept |
True when no compatibility spelling has been assigned.
在文件 Identity.h 第 374 行定义.
引用了 eve::detail::UuidIdState::spelling.
被这些函数引用 eve::editor::EditorSession::autosaveDocument(), eve::editor::ImportCoordinator::begin(), eve::editor::EditorTransactionConsumer::begin(), eve::editor::LocalTransactionBackend::begin(), eve::editor::EditorPropertyModel::beginTransaction(), eve::editor::UiSkinPreviewPlanner::build(), eve::editor::ScenePrefabService::capture(), eve::animation_editor::AnimationClipEditor::deleteSelectedKey(), eve::editor::EditorSession::editDocument(), eve::editor::EditorSession::executeCommandReceipt(), eve::editor::EditorFocusService::focus(), eve::audio_editing::AudioMixerTarget::makeCreate(), eve::housegen_editing::HouseGenDocumentTarget::makeCreateComponent(), eve::camera_editing::CameraDocumentTarget::makeCreateRig(), eve::animation_editor::AnimationClipEditor::moveSelectedKey(), eve::UuidIdAdapter< Tag >::operator bool(), eve::editor::EditorSession::pollDocumentChanges(), eve::editing::LocalWorldAuthority::preflight(), eve::editor::MemoryAssetDatabase::publish(), eve::map_editing::MapRoadMeshPublisher::publish(), eve::editor::MemoryAssetDatabase::publishBatch(), eve::editor::AutosaveService::readDraft(), eve::editor::MaterialPreviewService::render(), eve::editor::StylizeOffscreenPreviewService::render(), eve::editor::EditorSession::saveDocument(), eve::editor::DiskAssetCatalog::scan(), eve::editor::EnvironmentAssetBrowser::select(), eve::editor::EditorWorkspace::selectItem(), eve::editor::EditorWorkspace::setModeId(), eve::editor::EditorSession::update(), eve::editor::EditorPropertyModel::write(), eve::editor::AutosaveService::writeDraft() , 以及 eve::editor::DiskAssetCatalog::writeSidecar().
◆ format()
|
inlinenoexcept |
Returns the compatibility spelling; use canonicalFormat at persistence boundaries.
在文件 Identity.h 第 365 行定义.
◆ fromLegacy()
|
inlinestatic |
Builds an adapter while explicitly retaining a legacy spelling.
在文件 Identity.h 第 352 行定义.
引用了 eve::detail::UuidIdState::canonical, eve::detail::UuidIdState::projectLegacy(), eve::detail::UuidIdState::spelling, eve::detail::UuidIdState::uuid , 以及 eve::UuidIdAdapter< Tag >::value().
◆ fromUuid()
|
inlinestatic |
Builds an adapter from an explicit canonical UUID.
在文件 Identity.h 第 343 行定义.
引用了 eve::detail::UuidIdState::canonical, eve::detail::UuidIdState::spelling, eve::detail::UuidIdState::uuid , 以及 eve::UuidIdAdapter< Tag >::value().
◆ hash()
|
inlinenoexcept |
Stable hash of the canonical UUID projection.
在文件 Identity.h 第 383 行定义.
◆ isCanonicalUuid()
|
inlinenoexcept |
True when the input was canonical UUID text rather than legacy text.
在文件 Identity.h 第 380 行定义.
◆ isNil()
|
inlinenoexcept |
True when the value is an empty or UUID nil identity.
在文件 Identity.h 第 377 行定义.
引用了 eve::detail::UuidIdState::spelling , 以及 eve::detail::UuidIdState::uuid.
◆ operator bool()
|
inlineexplicitnoexcept |
Explicit boolean check for a non-empty identifier.
在文件 Identity.h 第 386 行定义.
◆ parse()
|
inlinestatic |
Parses canonical UUID text or a non-empty legacy spelling.
- 参数
-
value Input from an editor or compatibility boundary.
- 返回
- Empty only for an empty input; legacy text is deliberately accepted.
Constructs a UuidIdAdapter.
在文件 Identity.h 第 336 行定义.
引用了 eve::UuidIdAdapter< Tag >::UuidIdAdapter() , 以及 eve::UuidIdAdapter< Tag >::value().
◆ uuid()
|
inlinenoexcept |
Returns the canonical UUID projection.
在文件 Identity.h 第 368 行定义.
◆ value()
|
inlinenoexcept |
Returns the exact legacy or canonical compatibility spelling.
在文件 Identity.h 第 362 行定义.
引用了 eve::detail::UuidIdState::spelling.
被这些函数引用 eve::scene_editing::SceneTargetBase::applyDomainOperation(), eve::editor::ScenePrefabService::applyOverrides(), eve::ui_editing::assignThemeToken(), eve::editor::MaterialStudioController::beginInteraction(), eve::editor::EditorTargetCoordinator::bind(), eve::procgen_editing::SplinePathBinder::bindResult(), eve::procgen_editing::SplinePathGizmoBuilder::build(), eve::editor::UiSkinPreviewPlanner::build(), eve::editor::ScenePrefabService::capture(), eve::editing::LocalWorldAuthority::compensate(), eve::scene_editing::SceneHostEditorTarget::componentLinks(), eve::avatar_editor::AvatarDocumentEditor::createExpression(), eve::avatar_editor::AvatarDocumentEditor::createParameter(), eve::editor::AutosaveService::draftUri(), eve::editor::EditorValidationService::EditorValidationService(), eve::editor::EditorTargetCoordinator::Impl::execute(), eve::editor::EditorSession::executeCommandReceipt(), eve::editor::MemoryAssetDatabase::find(), eve::UuidIdAdapter< Tag >::fromLegacy(), eve::UuidIdAdapter< Tag >::fromUuid(), eve::editor::EditorWorkspace::getFocusedSurface(), eve::camera_editing::CameraPreview::gizmo(), eve::editor::EditorTargetCoordinator::inspect(), eve::editor::ScenePrefabService::instantiate(), eve::editor::ScenePrefabService::loadSnapshot(), eve::audio_editing::AudioMixerTarget::makeCreate(), eve::scene_editing::SceneTargetBase::makeCreate(), eve::ui_editing::UiDocumentTarget::makeCreate(), eve::audio_editing::AudioMixerTarget::makeDelete(), eve::scene_editing::SceneTargetBase::makeDelete(), eve::ui_editing::UiDocumentTarget::makeDelete(), eve::procgen_editing::SplinePathDocument::makeInsertPointAt(), eve::scene_editing::SceneTargetBase::makeRename(), eve::scene_editing::SceneTargetBase::makeReparent(), eve::audio_editing::AudioSourceTarget::makeReset(), eve::lighting_editing::LightingPropertyTargetBase::makeReset(), eve::material_editing::MaterialDocumentTarget::makeReset(), eve::physics_editing::PhysicsColliderTarget::makeReset(), eve::physics_editing::PhysicsJointTarget::makeReset(), eve::ui_editing::UiDocumentTarget::makeReset(), eve::editor::PluginPermissionTarget::makeSet(), eve::audio_editing::AudioSourceTarget::makeSet(), eve::editor::ProjectSettingsTarget::makeSet(), eve::lighting_editing::LightingPropertyTargetBase::makeSet(), eve::material_editing::MaterialDocumentTarget::makeSet(), eve::physics_editing::PhysicsColliderTarget::makeSet(), eve::physics_editing::PhysicsJointTarget::makeSet(), eve::scene_editing::ScenePropertyProvider::makeSet(), eve::ui_editing::UiDocumentTarget::makeSet(), eve::crowd_editing::CrowdDocumentTarget::makeSetAgent(), eve::social_editing::SocialDocumentTarget::makeSetEdge(), eve::social_editing::SocialDocumentTarget::makeSetEntity(), eve::crowd_editing::CrowdDocumentTarget::makeSetPath(), eve::animation_editing::AnimationClipDocumentTarget::makeSetTrack(), eve::scene_editing::SceneTargetBase::makeSetTransform(), eve::crowd_editing::CrowdDocumentTarget::makeSetZone(), eve::editor::ActionTimelineDocumentWorkspace::open(), eve::UuidIdAdapter< Tag >::parse(), eve::map_editing::MapDocumentTarget::previewRoad(), eve::editor::EditorTransactionConsumer::redo(), eve::editor::EditorTargetCoordinator::redo(), eve::procgen_editing::SplinePathBinder::refreshResult(), eve::editor::MaterialPreviewService::render(), eve::editor::DocumentService::requestSave(), eve::editor::ScenePrefabService::revertOverrides(), eve::editing::ruleDiagnostic(), eve::editor::DiskAssetCatalog::scan(), eve::editor::EditorWorkspace::setModeId(), eve::editor::ActionTimelineDocumentWorkspace::tabs(), eve::editor::EditorTransactionConsumer::undo(), eve::editor::EditorTargetCoordinator::undo(), eve::UuidIdAdapter< Tag >::UuidIdAdapter(), eve::editor::EditorPropertyModel::write(), eve::editor::AutosaveService::writeDraft() , 以及 eve::editor::DiskAssetCatalog::writeSidecar().
友元及相关函数文档
◆ operator<=>
|
friend |
Orders adapter values by their canonical UUID projection.
在文件 Identity.h 第 394 行定义.
◆ operator==
|
friend |
Operator ==.
在文件 Identity.h 第 389 行定义.
该类的文档由以下文件生成:
- src/engine/common/Identity.h