载入中...
搜索中...
未找到
ArtifactProvider.h
浏览该文件的文档.
1#pragma once
2
10
11#include <cstddef>
12#include <cstdint>
13#include <string>
14#include <vector>
15
16namespace eve::scene {
17
22
28
32 std::string buildKey;
34 std::vector<SceneArtifactNode> nodes;
35};
36
45public:
48 const eve::artifact::PublicationView& publication) override;
50 [[nodiscard]] eve::Result<eve::Value> snapshotState() const override;
52 [[nodiscard]] eve::Result<void> restoreState(const eve::Value& state) override;
54 [[nodiscard]] bool emptyState() const noexcept override { return records_.empty(); }
56 void clearState() noexcept override { clear(); }
57
66 [[nodiscard]] const SceneArtifactRecord* find(eve::PersistentId id) const noexcept;
68 [[nodiscard]] std::size_t size() const noexcept { return records_.size(); }
70 void clear() noexcept;
72 void setPrepareFailure(bool enabled) noexcept { failPrepare_ = enabled; }
73
74private:
75 friend class SceneArtifactStage;
76 void commit(SceneArtifactRecord record) noexcept;
77 std::vector<SceneArtifactRecord> records_;
78 std::uint32_t nextIndex_ = 0;
79 bool failPrepare_ = false;
80};
81
86
87} // namespace eve::scene
Low-level capability contracts for publishing backend-neutral artifacts.
#define EVENGINE_API_PLATFORM
Definition Export.h:107
Strong generation-qualified handles for non-ECS runtime registries.
Move-only operation result carrying either a value or Status.
Definition Result.h:155
The canonical owning dynamic value used by data-facing protocols.
Definition Value.h:31
Scene graph publication capability, implemented by the scene module.
Id128 public API.
Definition Identity.h:112
Real scene-module provider for generated artifact publication.
std::size_t size() const noexcept
Return the number of committed scene artifact records.
void clearState() noexcept override
Clear provider state through the common restore-cleanup hook.
bool emptyState() const noexcept override
Return whether the scene registry has no committed records.
void registerSceneArtifactProvider()
Register the scene provider in the common capability registry.
SceneArtifactProvider & sceneArtifactProvider() noexcept
Return the process-owned scene artifact provider singleton.
bool enabled
Backend-neutral axis-aligned bounds copied from a generated part.
Borrowed immutable view of one complete generated publication.
Owner tag for scene artifact runtime handles.
Backend-neutral node observable emitted for one artifact part.
eve::artifact::Bounds bounds
Queryable scene registry record for one published artifact.
std::vector< SceneArtifactNode > nodes