#include <Identity.h>
Public 类型 | |
| using | Bytes = std::array< std::uint8_t, 16 > |
Public 成员函数 | |
| constexpr | Id128 () noexcept=default |
| Constructs the nil value. | |
| constexpr | Id128 (Bytes bytes) noexcept |
| Constructs an ID from its exact 128-bit representation. | |
| std::string | format () const |
| Formats the ID in lower-case canonical UUID text. | |
| constexpr bool | isNil () const noexcept |
| Returns whether this value is the all-zero nil ID. | |
| Id128 | child (std::string_view role) const noexcept |
| Derives a deterministic child UUID for a hierarchical identity. | |
| constexpr Bytes | bytes () const noexcept |
| Returns the UUID bytes in network order. | |
| constexpr std::uint64_t | hash () const noexcept |
| Returns a stable non-cryptographic hash for hash tables. | |
静态 Public 成员函数 | |
| template<typename OtherTag > | |
| static constexpr Id128 | fromUuid (const Id128< OtherTag > &value) noexcept |
| Re-tags an existing UUID at an explicit domain boundary. | |
| static constexpr Id128 | nil () noexcept |
| Returns the all-zero nil value. | |
| static std::optional< Id128 > | parse (std::string_view text) noexcept |
| Parses canonical UUID text. | |
| static std::optional< Id128 > | fromBytes (std::span< const std::uint8_t > bytes) noexcept |
| Constructs an ID from exactly 16 bytes. | |
友元 | |
| constexpr bool | operator== (const Id128 &, const Id128 &) noexcept=default |
| Operator ==. | |
| constexpr auto | operator<=> (const Id128 &lhs, const Id128 &rhs) noexcept |
| Orders UUID bytes in network order for ordered containers. | |
详细描述
成员类型定义说明
◆ Bytes
| using eve::detail::Id128< Tag >::Bytes = std::array<std::uint8_t, 16> |
在文件 Identity.h 第 114 行定义.
构造及析构函数说明
◆ Id128() [1/2]
|
constexprdefaultnoexcept |
Constructs the nil value.
被这些函数引用 eve::detail::Id128< Tag >::child(), eve::detail::Id128< Tag >::fromBytes(), eve::detail::Id128< Tag >::fromUuid() , 以及 eve::detail::Id128< Tag >::parse().
◆ Id128() [2/2]
|
inlineexplicitconstexprnoexcept |
Constructs an ID from its exact 128-bit representation.
- 参数
-
bytes The bytes in UUID network order (most significant byte first).
在文件 Identity.h 第 123 行定义.
成员函数说明
◆ bytes()
|
inlineconstexprnoexcept |
Returns the UUID bytes in network order.
- 返回
- A copy of the owned 128-bit representation.
在文件 Identity.h 第 202 行定义.
被这些函数引用 eve::detail::Id128< Tag >::fromBytes() , 以及 eve::detail::Id128< Tag >::parse().
◆ child()
|
inlinenoexcept |
Derives a deterministic child UUID for a hierarchical identity.
- 参数
-
role Non-empty, caller-canonicalized role or child key.
- 返回
- A stable child identity, or nil for a nil parent or empty role.
- 备注
- This is a namespace derivation operation. It is not a source of new instance entropy; use UUIDv7 generation for top-level identities. The operation is kept in the common UUID type so compatibility aliases cannot grow a second identity algorithm.
Constructs a Id128.
在文件 Identity.h 第 192 行定义.
引用了 eve::detail::childUuidBytes(), eve::detail::Id128< Tag >::Id128(), eve::detail::Id128< Tag >::isNil() , 以及 eve::detail::Id128< Tag >::nil().
被这些函数引用 eve::asset_import::bindUnityRenderers(), eve::asset_import::prepareCanonicalTerrainImport(), eve::asset_import::prepareGltfImport(), eve::asset_procgen::prepareGtsTerrainLodPackage(), eve::asset_import::prepareImageImport(), eve::asset_import::prepareLegacyAnimationImport(), eve::asset_stylize::prepareMeshVfxPackage(), eve::asset_import::prepareShaderImport(), eve::asset_import::prepareUnityNativeMesh(), eve::asset_import::prepareUnityNativeTexture(), eve::asset_import::prepareUnityNativeVolumeTexture(), eve::asset_import::prepareUnitySpriteAnimation(), eve::asset_import::prepareUnityVegetationMaterial(), eve::asset_import::prepareUnityVegetationPreset() , 以及 eve::asset_import::prepareUnityVegetationScene().
◆ format()
|
inline |
Formats the ID in lower-case canonical UUID text.
- 返回
- A stable 8-4-4-4-12 textual representation.
在文件 Identity.h 第 173 行定义.
引用了 eve::detail::formatUuidBytes().
被这些函数引用 eve::effects::EffectDefinitionRuntime::applyTo(), eve::vehicle::VehicleDefinitionRuntime::applyTo(), eve::transaction::Ledger::create(), eve::settlement::createSettlementReplayRecord(), eve::AssetRef::format(), eve::SubjectRef::format(), eve::game_event::CorrelationId::format(), eve::asset_import::prepareCanonicalTerrainImport(), eve::asset_stylize::prepareMeshVfxPackage(), eve::editor::publishEvaAssetProjection(), eve::asset::EvpackRegistry::resolveChunk(), eve::asset::serializeEvaManifest(), eve::snapshotEnvelopeValue() , 以及 eve::transaction::Plan::stage().
◆ fromBytes()
|
inlinestaticnoexcept |
Constructs an ID from exactly 16 bytes.
- 参数
-
bytes The bytes in UUID network order.
- 返回
- The ID, or empty when the span is not exactly 16 bytes.
Constructs a Id128.
在文件 Identity.h 第 161 行定义.
引用了 eve::detail::Id128< Tag >::bytes() , 以及 eve::detail::Id128< Tag >::Id128().
◆ fromUuid()
|
inlinestaticconstexprnoexcept |
Re-tags an existing UUID at an explicit domain boundary.
- 模板参数
-
OtherTag The source UUID domain.
- 参数
-
value The source UUID; its bytes are copied without reinterpretation.
- 返回
- A UUID with the target domain tag.
- 备注
- This is intentionally explicit. Callers must document why a UUID changes semantic domain; ordinary assignment cannot mix identities such as an asset and a scene object.
From uuid.
Constructs a Id128.
在文件 Identity.h 第 136 行定义.
引用了 eve::detail::Id128< Tag >::Id128() , 以及 value.
被这些函数引用 eve::game_event::GameEventLog::append(), eve::effects::EffectContainer::apply(), eve::card::CardEffectExecutor::applyImmediate(), eve::effects::EffectDefinitionRuntime::applyTo(), eve::transaction::Ledger::create(), eve::procgen::ArtifactPublisher::publish(), eve::card::CardEffectExecutor::settle() , 以及 eve::transaction::Plan::stage().
◆ hash()
|
inlineconstexprnoexcept |
Returns a stable non-cryptographic hash for hash tables.
- 返回
- A deterministic 64-bit hash of all 16 bytes.
- 备注
- This is not a content digest and must not be used as a security primitive or as a replacement for ContentId.
在文件 Identity.h 第 210 行定义.
◆ isNil()
|
inlineconstexprnoexcept |
Returns whether this value is the all-zero nil ID.
在文件 Identity.h 第 176 行定义.
被这些函数引用 eve::game_event::GameEventLog::append(), eve::asset_import::detail::baseManifest(), eve::asset::buildEvpack(), eve::detail::Id128< Tag >::child(), eve::transaction::Ledger::create(), eve::definition::InstanceIdentity::create(), eve::settlement::createSettlementReplayRecord(), eve::transaction::Ledger::find(), eve::definition::InstanceIdentity::isValid(), eve::SubjectRef::isValid(), eve::graphics::GraphicsArtifactProvider::prepare(), eve::map::MapArtifactProvider::prepare(), eve::physics::PhysicsArtifactProvider::prepare(), eve::scene::SceneArtifactProvider::prepare(), eve::asset_stylize::prepareMeshVfxPackage(), eve::asset::EvpackResourceReader::read(), eve::physics::World::restore(), eve::physics::World3D::restore(), eve::game_event::GameEventLog::restore(), eve::authority::Store::restoreSnapshot(), eve::definitions::DefinitionRegistry::restoreSnapshot(), eve::game_event::GameEventLog::restoreSnapshot(), eve::policyregistry::PolicyRegistry::restoreSnapshot(), eve::production::WorkQueue::restoreSnapshot(), eve::transaction::Plan::stage() , 以及 eve::physics::World::World().
◆ nil()
|
inlinestaticconstexprnoexcept |
Returns the all-zero nil value.
在文件 Identity.h 第 142 行定义.
被这些函数引用 eve::detail::Id128< Tag >::child(), eve::makeSnapshotEnvelope(), eve::scene::SceneNodeRef::persistentId(), eve::game_event::GameEventLog::restore() , 以及 eve::rpg::RPGSaveSession::snapshotJson().
◆ parse()
|
inlinestaticnoexcept |
Parses canonical UUID text.
- 参数
-
text A 36-character UUID with 8-4-4-4-12 hexadecimal groups.
- 返回
- The parsed value, or empty when the text is malformed.
- 备注
- Parsing accepts upper- and lower-case hexadecimal digits but does not accept braces or non-canonical separators.
在文件 Identity.h 第 151 行定义.
引用了 eve::detail::Id128< Tag >::bytes(), eve::detail::Id128< Tag >::Id128(), eve::detail::parseUuidText() , 以及 text.
被这些函数引用 eve::effects::EffectContainer::applyCanonical(), eve::card::CardEffectExecutor::applyImmediate(), eve::pixelworld_streaming::decodeChunkBatchArchive(), eve::AssetRef::fromUri(), eve::asset_scene::EvpackSceneTemplateLoader::load(), eve::ObjectRef::parse(), eve::asset::parseEvaManifest(), eve::rts::script_internal::parseScriptSubject(), eve::parseSnapshotEnvelopeValue(), eve::dialogue::DialogueFlow::publishGameplay(), eve::inventory::Inventory::publishGameplay(), eve::card::Card::publishGameplay(), eve::economy::Economy::publishGameplay(), eve::sensing::SensingWorldCandidateProvider::query(), eve::game_event::GameEventLog::restore(), eve::transaction::Ledger::restore(), eve::definition::restoreRuntimeInstance(), eve::graphics::GraphicsArtifactProvider::restoreState(), eve::map::MapArtifactProvider::restoreState(), eve::physics::PhysicsArtifactProvider::restoreState(), eve::scene::SceneArtifactProvider::restoreState(), eve::card::CardEffectExecutor::settle(), eve::rpg::BattleControl::submitGameplay(), eve::card::Card::unpublishGameplay(), eve::dialogue::DialogueFlow::unpublishGameplay(), eve::economy::Economy::unpublishGameplay(), eve::inventory::Inventory::unpublishGameplay() , 以及 eve::settlement::verifySettlementReplayRecord().
友元及相关函数文档
◆ operator<=>
|
friend |
Orders UUID bytes in network order for ordered containers.
在文件 Identity.h 第 223 行定义.
◆ operator==
|
friend |
Operator ==.
该类的文档由以下文件生成:
- src/engine/common/Identity.h