载入中...
搜索中...
未找到
ArtifactPublish.h
浏览该文件的文档.
1#pragma once
2
8#include "common/Result.h"
9#include "common/Snapshot.h"
11
12#include <memory>
13
14namespace eve::procgen {
15
16// The low-level contracts live in common so scene/map/graphics/physics can
17// implement them without a reverse include of procgen. These aliases preserve
18// the established procgen-facing source API.
25
29 bool scenePublished = false;
30 bool graphicsPublished = false;
31 bool physicsPublished = false;
32 bool mapPublished = false;
33};
34
42
49public:
51 explicit ArtifactPublisher(ArtifactStore& store) noexcept : store_(store) {}
52
63
69 [[nodiscard]] eve::Result<eve::SnapshotEnvelope> snapshot(const ArtifactSnapshotContext& context) const;
70
77 [[nodiscard]] eve::Result<void> restore(const eve::SnapshotEnvelope& snapshot,
78 const eve::SnapshotHashProvider& hashProvider);
79
80private:
81 ArtifactStore& store_;
82};
83
84} // namespace eve::procgen
#define EVENGINE_API_DOMAINS
Definition Export.h:110
Owning, backend-neutral products published by procedural generation.
Move-only, checked operation results for the common layer.
Versioned, integrity-checked persistence envelopes.
const SquirrelValueOptions & options
const VegetationPresetContext & context
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Graphics resource publication capability, implemented by graphics.
Tile/map publication capability, implemented by the map module.
Collider publication capability, implemented by physics.
Scene graph publication capability, implemented by the scene module.
A prepared consumer mutation with a non-throwing visibility boundary.
Id128 public API.
Definition Identity.h:112
Coordinates adapter preparation and atomic CPU-store publication.
ArtifactPublisher(ArtifactStore &store) noexcept
Bind a publisher to a store it does not own.
In-memory owner and publisher for generated artifacts.
Result< int > publish(Heightmap &target, std::vector< float > candidate)
Publish.
std::function< Result< ContentId >(std::string_view canonicalInput)> SnapshotHashProvider
Injected content-digest implementation used by snapshots.
Definition Snapshot.h:36
Stable outer format shared by persistence and cross-process snapshots.
Definition Snapshot.h:46
Required provider set for one artifact publication transaction.
Compatibility receipt retaining procgen ArtifactId at this boundary.
Snapshot context supplied by the caller; time and hashing are injected.
eve::SnapshotHashProvider hashProvider
Complete immutable-once-published artifact record.