载入中...
搜索中...
未找到
eve::IProcgenSceneSink类 参考abstract

Optional scene consumer for procedural instance batches. 更多...

#include <ProcgenSceneSink.h>

类 eve::IProcgenSceneSink 继承关系图:
eve::asset_graphics::ProcgenPrefabSceneSink

Public 成员函数

virtual ~IProcgenSceneSink ()=default
 I procgen scene sink.
 
virtual bool applyBatch (const std::string &batchId, const std::vector< ProcgenInstanceDesc > &instances)=0
 Create or reconcile all instances in a named batch.
 
virtual Result< uint64_t > replaceBatch (const std::string &batchId, uint64_t targetRevision, const std::vector< ProcgenInstanceDesc > &instances)=0
 Atomically replace a batch with a complete stable-identity snapshot at an explicit revision.
 
virtual Result< uint64_t > replaceBatches (const std::vector< ProcgenBatchSnapshot > &snapshots)=0
 Atomically replace several batches from complete snapshots.
 
virtual bool removeBatch (const std::string &batchId)=0
 Remove the visible contents of a batch.
 
virtual Result< uint64_t > removeBatches (const std::vector< std::string > &batchIds)=0
 Atomically remove several published batches.
 
virtual Result< uint64_t > removeBatchesCoordinated (const std::vector< std::string > &batchIds, const std::function< Result< void >()> &commitPreparedOwner)=0
 Remove several batches while coordinating one external authoritative commit.
 
virtual Result< uint64_t > applyDelta (const std::string &batchId, const ProcgenInstanceDelta &delta)=0
 Apply one prevalidated identity delta atomically to an existing batch.
 
virtual uint64_t batchRevision (const std::string &batchId) const =0
 Current committed revision of a batch, or zero when it is absent.
 
virtual int instanceCount (const std::string &batchId) const =0
 Number of currently published instances in a batch.
 
virtual int lastCreatedCount (const std::string &batchId) const =0
 Instances newly created by the batch's latest successful apply.
 
virtual int lastReusedCount (const std::string &batchId) const =0
 Stable-id instances reused by the batch's latest successful apply.
 
virtual int lastRemovedCount (const std::string &batchId) const =0
 Instances removed by the batch's latest successful apply or removal.
 
virtual Result< uint64_t > replaceBatchesCoordinated (const std::vector< ProcgenBatchSnapshot > &snapshots, const std::function< Result< void >()> &commitPreparedOwner)
 Replace complete batches while committing one prepared external resource owner.
 

静态 Public 属性

static constexpr const char * capabilityName = "IProcgenSceneSink"
 

详细描述

Optional scene consumer for procedural instance batches.

The interface lives in common so procgen can publish results without an upward dependency on scene. Scene providers must replace a batch atomically and preserve stable instance ids across rebuilds.

在文件 ProcgenSceneSink.h 第 92 行定义.

构造及析构函数说明

◆ ~IProcgenSceneSink()

virtual eve::IProcgenSceneSink::~IProcgenSceneSink ( )
virtualdefault

I procgen scene sink.

成员函数说明

◆ applyBatch()

virtual bool eve::IProcgenSceneSink::applyBatch ( const std::string &  batchId,
const std::vector< ProcgenInstanceDesc > &  instances 
)
pure virtual

Create or reconcile all instances in a named batch.

在 eve::asset_graphics::ProcgenPrefabSceneSink 内被实现.

◆ applyDelta()

virtual Result< uint64_t > eve::IProcgenSceneSink::applyDelta ( const std::string &  batchId,
const ProcgenInstanceDelta &  delta 
)
pure virtual

Apply one prevalidated identity delta atomically to an existing batch.

返回
The committed target revision, or a structured stale/validation/provider failure. @thread Called synchronously on the scene-owning thread; implementations must not retain references. @reentrant Not reentrant for the same batch.

在 eve::asset_graphics::ProcgenPrefabSceneSink 内被实现.

◆ batchRevision()

virtual uint64_t eve::IProcgenSceneSink::batchRevision ( const std::string &  batchId) const
pure virtual

Current committed revision of a batch, or zero when it is absent.

在 eve::asset_graphics::ProcgenPrefabSceneSink 内被实现.

被这些函数引用 eve::asset_graphics::ProcgenPrefabSceneSink::Impl::prepare() , 以及 eve::asset_graphics::ProcgenPrefabSceneSink::Impl::validateRevision().

◆ instanceCount()

virtual int eve::IProcgenSceneSink::instanceCount ( const std::string &  batchId) const
pure virtual

Number of currently published instances in a batch.

在 eve::asset_graphics::ProcgenPrefabSceneSink 内被实现.

◆ lastCreatedCount()

virtual int eve::IProcgenSceneSink::lastCreatedCount ( const std::string &  batchId) const
pure virtual

Instances newly created by the batch's latest successful apply.

在 eve::asset_graphics::ProcgenPrefabSceneSink 内被实现.

◆ lastRemovedCount()

virtual int eve::IProcgenSceneSink::lastRemovedCount ( const std::string &  batchId) const
pure virtual

Instances removed by the batch's latest successful apply or removal.

在 eve::asset_graphics::ProcgenPrefabSceneSink 内被实现.

◆ lastReusedCount()

virtual int eve::IProcgenSceneSink::lastReusedCount ( const std::string &  batchId) const
pure virtual

Stable-id instances reused by the batch's latest successful apply.

在 eve::asset_graphics::ProcgenPrefabSceneSink 内被实现.

◆ removeBatch()

virtual bool eve::IProcgenSceneSink::removeBatch ( const std::string &  batchId)
pure virtual

Remove the visible contents of a batch.

在 eve::asset_graphics::ProcgenPrefabSceneSink 内被实现.

◆ removeBatches()

virtual Result< uint64_t > eve::IProcgenSceneSink::removeBatches ( const std::vector< std::string > &  batchIds)
pure virtual

Atomically remove several published batches.

参数
batchIdsNon-empty unique identities of existing batches.
返回
Number of removed batches, or a structured failure with no batch changed. @thread Called synchronously on the scene-owning thread; implementations must not retain references. @reentrant Not reentrant. Callbacks run only after every batch is no longer visible or queryable.

在 eve::asset_graphics::ProcgenPrefabSceneSink 内被实现.

◆ removeBatchesCoordinated()

virtual Result< uint64_t > eve::IProcgenSceneSink::removeBatchesCoordinated ( const std::vector< std::string > &  batchIds,
const std::function< Result< void >()> &  commitPreparedOwner 
)
pure virtual

Remove several batches while coordinating one external authoritative commit.

参数
batchIdsNon-empty unique identities of existing batches.
commitPreparedOwnerCalled after Scene preparation and before Scene state becomes visible.
返回
Number of removed batches, or a structured failure with neither owner changed. Post-commit notification exceptions return Applied with warning diagnostics; they do not undo publication. @thread Called synchronously on the scene-owning thread; references are not retained. @reentrant The commit callback must not reenter Scene and must leave its owner unchanged on failure.

在 eve::asset_graphics::ProcgenPrefabSceneSink 内被实现.

◆ replaceBatch()

virtual Result< uint64_t > eve::IProcgenSceneSink::replaceBatch ( const std::string &  batchId,
uint64_t  targetRevision,
const std::vector< ProcgenInstanceDesc > &  instances 
)
pure virtual

Atomically replace a batch with a complete stable-identity snapshot at an explicit revision.

参数
batchIdNon-empty batch identity.
targetRevisionNon-zero revision newer than the currently committed batch revision.
instancesComplete ordered target snapshot; every instance must have a unique non-zero source PointId.
返回
The committed target revision, or a structured stale/validation/provider failure. @thread Called synchronously on the scene-owning thread; implementations must not retain references. @reentrant Not reentrant for the same batch.

在 eve::asset_graphics::ProcgenPrefabSceneSink 内被实现.

◆ replaceBatches()

virtual Result< uint64_t > eve::IProcgenSceneSink::replaceBatches ( const std::vector< ProcgenBatchSnapshot > &  snapshots)
pure virtual

Atomically replace several batches from complete snapshots.

参数
snapshotsNon-empty transaction whose batch ids are unique.
返回
Number of committed batches, or a structured failure with no batch changed. @thread Called synchronously on the scene-owning thread; implementations must not retain references. @reentrant Not reentrant. No scene callback may observe a partially committed transaction.

在 eve::asset_graphics::ProcgenPrefabSceneSink 内被实现.

◆ replaceBatchesCoordinated()

virtual Result< uint64_t > eve::IProcgenSceneSink::replaceBatchesCoordinated ( const std::vector< ProcgenBatchSnapshot > &  snapshots,
const std::function< Result< void >()> &  commitPreparedOwner 
)
inlinevirtual

Replace complete batches while committing one prepared external resource owner.

参数
snapshotsNon-empty unique batch snapshots with newer non-zero revisions.
commitPreparedOwnerSynchronous commit after Scene preparation, before any Scene publication or events.
返回
Committed batch count, or failure with prior Scene batches unchanged. Unsupported providers do not call commit. Post-commit notification exceptions return Applied with warning diagnostics, preserving the committed outcome. @thread Scene-owner thread, outside ECS iteration; references are call-scoped, no locks. @reentrant Commit must not access or mutate Scene, invoke scripts, or reenter the sink; failure leaves its owner unchanged. @cost Linear in target instances and the committed Scene cache; staging allocations amortized per explicit publication.

被 eve::asset_graphics::ProcgenPrefabSceneSink 重载.

在文件 ProcgenSceneSink.h 第 172 行定义.

类成员变量说明

◆ capabilityName

constexpr const char* eve::IProcgenSceneSink::capabilityName = "IProcgenSceneSink"
staticconstexpr

在文件 ProcgenSceneSink.h 第 94 行定义.


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