载入中...
搜索中...
未找到
eve::procgen::ArtifactPublisher类 参考

Coordinates adapter preparation and atomic CPU-store publication. 更多...

#include <ArtifactPublish.h>

Public 成员函数

 ArtifactPublisher (ArtifactStore &store) noexcept
 Bind a publisher to a store it does not own.
 
eve::Result< ArtifactPublishReceipt > publish (GeneratedArtifact artifact, ArtifactPublishOptions options)
 Publish through required capabilities and then atomically into the store.
 
eve::Result< eve::SnapshotEnvelope > snapshot (const ArtifactSnapshotContext &context) const
 Capture store and registered provider state in a sealed snapshot.
 
eve::Result< void > restore (const eve::SnapshotEnvelope &snapshot, const eve::SnapshotHashProvider &hashProvider)
 Restore store and provider state transactionally from a sealed snapshot.
 

详细描述

Coordinates adapter preparation and atomic CPU-store publication.

注解
Main/simulation thread only. Adapter callbacks must not re-enter this publisher for the same ArtifactStore.

在文件 ArtifactPublish.h 第 48 行定义.

构造及析构函数说明

◆ ArtifactPublisher()

eve::procgen::ArtifactPublisher::ArtifactPublisher ( ArtifactStore &  store)
inlineexplicitnoexcept

Bind a publisher to a store it does not own.

在文件 ArtifactPublish.h 第 51 行定义.

成员函数说明

◆ publish()

eve::Result< ArtifactPublishReceipt > eve::procgen::ArtifactPublisher::publish ( GeneratedArtifact  artifact,
ArtifactPublishOptions  options 
)

Publish through required capabilities and then atomically into the store.

参数
artifactOwning CPU artifact.
optionsRequired scene/graphics/physics adapters.
返回
Receipt, Unsupported for a missing capability, or provider/store failure.
备注
Any Result failure rolls back every prepared adapter and leaves the ArtifactStore unchanged.

在文件 ArtifactPublish.cpp 第 383 行定义.

引用了 eve::transaction::Committed, context, error, eve::Diagnostic::error(), eve::transaction::Coordinator::execute(), eve::Failed, eve::Result< T >::failure(), eve::detail::Id128< Tag >::fromUuid(), eve::procgen::ArtifactPublishReceipt::graphicsPublished, eve::procgen::ArtifactPublishReceipt::id, eve::InvariantViolation, eve::procgen::ArtifactPublishReceipt::mapPublished, options, eve::procgen::ArtifactPublishReceipt::physicsPublished, scene, eve::procgen::ArtifactPublishReceipt::scenePublished , 以及 eve::Result< T >::success().

被这些函数引用 eve::procgen::Procgen::buildMeshHandle() , 以及 eve::procgen::Procgen::publishArtifact().

◆ restore()

eve::Result< void > eve::procgen::ArtifactPublisher::restore ( const eve::SnapshotEnvelope &  snapshot,
const eve::SnapshotHashProvider &  hashProvider 
)

Restore store and provider state transactionally from a sealed snapshot.

参数
snapshotVerified artifact publication snapshot.
hashProviderHash provider used to verify the envelope.
返回
Applied or a structured validation/provider error.

在文件 ArtifactPublish.cpp 第 477 行定义.

引用了 eve::Applied, eve::transaction::Committed, eve::Conflict, context, eve::artifact::ProviderContract::emptyState(), eve::Diagnostic::error(), eve::transaction::Coordinator::execute(), eve::Failed, eve::Result< T >::failure(), eve::Value::find(), found, eve::LogicalId::fromParts(), eve::InvariantViolation, name, eve::ParseError, payload, scene, eve::procgen::ArtifactStore::size(), snapshot(), state, eve::Status::success(), eve::Result< T >::success(), eve::UnknownVersion, eve::Unsupported , 以及 eve::verifySnapshotEnvelope().

◆ snapshot()

eve::Result< eve::SnapshotEnvelope > eve::procgen::ArtifactPublisher::snapshot ( const ArtifactSnapshotContext &  context) const

Capture store and registered provider state in a sealed snapshot.

参数
contextStable instance/revision/tick and injected content hash.
返回
Versioned snapshot, or Unsupported when a requested provider is absent.

在文件 ArtifactPublish.cpp 第 440 行定义.

引用了 context, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::LogicalId::fromParts(), eve::InvariantViolation, eve::makeSnapshotEnvelope(), name, payload, scene, eve::procgen::ArtifactStore::snapshotState(), state, eve::Result< T >::success() , 以及 eve::Unsupported.

被这些函数引用 restore().


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