载入中...
搜索中...
未找到
eve::UuidIdAdapter< Tag > 模板类 参考

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.
 

详细描述

template<typename Tag>
class eve::UuidIdAdapter< Tag >

UUID-backed identifier adapter for legacy textual boundaries.

模板参数
TagDomain 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

template<typename Tag >
using eve::UuidIdAdapter< Tag >::Bytes = typename Uuid::Bytes

在文件 Identity.h 第 317 行定义.

◆ Uuid

template<typename Tag >
using eve::UuidIdAdapter< Tag >::Uuid = StrongUuid<Tag>

在文件 Identity.h 第 316 行定义.

构造及析构函数说明

◆ UuidIdAdapter() [1/4]

template<typename Tag >
eve::UuidIdAdapter< Tag >::UuidIdAdapter ( )
default

Constructs an empty compatibility identifier.

被这些函数引用 eve::UuidIdAdapter< Tag >::parse().

◆ UuidIdAdapter() [2/4]

template<typename Tag >
eve::UuidIdAdapter< Tag >::UuidIdAdapter ( const char *  value)
inlineexplicit

Constructs from a legacy spelling or canonical UUID text.

在文件 Identity.h 第 323 行定义.

◆ UuidIdAdapter() [3/4]

template<typename Tag >
eve::UuidIdAdapter< Tag >::UuidIdAdapter ( std::string  value)
inlineexplicit

Constructs from a legacy spelling or canonical UUID text.

在文件 Identity.h 第 326 行定义.

◆ UuidIdAdapter() [4/4]

template<typename Tag >
eve::UuidIdAdapter< Tag >::UuidIdAdapter ( std::string_view  value)
inlineexplicit

Constructs from a legacy spelling or canonical UUID text.

在文件 Identity.h 第 329 行定义.

引用了 eve::detail::UuidIdState::assign() , 以及 eve::UuidIdAdapter< Tag >::value().

成员函数说明

◆ canonicalFormat()

template<typename Tag >
std::string eve::UuidIdAdapter< Tag >::canonicalFormat ( ) const
inline

Returns the canonical UUID projection as lower-case UUID text.

在文件 Identity.h 第 371 行定义.

引用了 eve::detail::formatUuidBytes() , 以及 eve::detail::UuidIdState::uuid.

◆ empty()

template<typename Tag >
bool eve::UuidIdAdapter< Tag >::empty ( ) const
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()

template<typename Tag >
const std::string & eve::UuidIdAdapter< Tag >::format ( ) const
inlinenoexcept

Returns the compatibility spelling; use canonicalFormat at persistence boundaries.

在文件 Identity.h 第 365 行定义.

引用了 eve::detail::UuidIdState::spelling.

◆ fromLegacy()

template<typename Tag >
static UuidIdAdapter eve::UuidIdAdapter< Tag >::fromLegacy ( std::string  value)
inlinestatic

◆ fromUuid()

template<typename Tag >
static UuidIdAdapter eve::UuidIdAdapter< Tag >::fromUuid ( Uuid  value)
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()

template<typename Tag >
std::uint64_t eve::UuidIdAdapter< Tag >::hash ( ) const
inlinenoexcept

Stable hash of the canonical UUID projection.

在文件 Identity.h 第 383 行定义.

引用了 eve::detail::UuidIdState::uuid.

◆ isCanonicalUuid()

template<typename Tag >
bool eve::UuidIdAdapter< Tag >::isCanonicalUuid ( ) const
inlinenoexcept

True when the input was canonical UUID text rather than legacy text.

在文件 Identity.h 第 380 行定义.

引用了 eve::detail::UuidIdState::canonical.

◆ isNil()

template<typename Tag >
bool eve::UuidIdAdapter< Tag >::isNil ( ) const
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()

template<typename Tag >
eve::UuidIdAdapter< Tag >::operator bool ( ) const
inlineexplicitnoexcept

Explicit boolean check for a non-empty identifier.

在文件 Identity.h 第 386 行定义.

引用了 eve::UuidIdAdapter< Tag >::empty().

◆ parse()

template<typename Tag >
static std::optional< UuidIdAdapter > eve::UuidIdAdapter< Tag >::parse ( std::string_view  value)
inlinestatic

Parses canonical UUID text or a non-empty legacy spelling.

参数
valueInput 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()

template<typename Tag >
Uuid eve::UuidIdAdapter< Tag >::uuid ( ) const
inlinenoexcept

Returns the canonical UUID projection.

在文件 Identity.h 第 368 行定义.

引用了 eve::detail::UuidIdState::uuid.

◆ value()

template<typename Tag >
const std::string & eve::UuidIdAdapter< Tag >::value ( ) const
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<=>

template<typename Tag >
auto operator<=> ( const UuidIdAdapter< Tag > &  lhs,
const UuidIdAdapter< Tag > &  rhs 
)
friend

Orders adapter values by their canonical UUID projection.

在文件 Identity.h 第 394 行定义.

◆ operator==

template<typename Tag >
bool operator== ( const UuidIdAdapter< Tag > &  lhs,
const UuidIdAdapter< Tag > &  rhs 
)
friend

Operator ==.

在文件 Identity.h 第 389 行定义.


该类的文档由以下文件生成: