Optional scene consumer for procedural instance batches.
更多...
#include <ProcgenSceneSink.h>
|
| 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.
|
| |
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 第 62 行定义.
◆ ~IProcgenSceneSink()
| virtual eve::IProcgenSceneSink::~IProcgenSceneSink |
( |
| ) |
|
|
virtualdefault |
◆ 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.
◆ applyDelta()
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.
◆ 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.
◆ instanceCount()
| virtual int eve::IProcgenSceneSink::instanceCount |
( |
const std::string & |
batchId | ) |
const |
|
pure virtual |
Number of currently published instances in a batch.
◆ lastCreatedCount()
| virtual int eve::IProcgenSceneSink::lastCreatedCount |
( |
const std::string & |
batchId | ) |
const |
|
pure virtual |
Instances newly created by the batch's latest successful apply.
◆ lastRemovedCount()
| virtual int eve::IProcgenSceneSink::lastRemovedCount |
( |
const std::string & |
batchId | ) |
const |
|
pure virtual |
Instances removed by the batch's latest successful apply or removal.
◆ lastReusedCount()
| virtual int eve::IProcgenSceneSink::lastReusedCount |
( |
const std::string & |
batchId | ) |
const |
|
pure virtual |
Stable-id instances reused by the batch's latest successful apply.
◆ removeBatch()
| virtual bool eve::IProcgenSceneSink::removeBatch |
( |
const std::string & |
batchId | ) |
|
|
pure virtual |
Remove the visible contents of a batch.
◆ removeBatches()
| virtual Result< uint64_t > eve::IProcgenSceneSink::removeBatches |
( |
const std::vector< std::string > & |
batchIds | ) |
|
|
pure virtual |
Atomically remove several published batches.
- 参数
-
| batchIds | Non-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.
◆ 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.
- 参数
-
| batchIds | Non-empty unique identities of existing batches. |
| commitPreparedOwner | Called after Scene preparation and before Scene state becomes visible. |
- 返回
- Number of removed batches, or a structured failure with neither owner changed. @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.
◆ 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.
- 参数
-
| batchId | Non-empty batch identity. |
| targetRevision | Non-zero revision newer than the currently committed batch revision. |
| instances | Complete 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.
◆ replaceBatches()
Atomically replace several batches from complete snapshots.
- 参数
-
| snapshots | Non-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.
◆ capabilityName
| constexpr const char* eve::IProcgenSceneSink::capabilityName = "IProcgenSceneSink" |
|
staticconstexpr |
该类的文档由以下文件生成: