载入中...
搜索中...
未找到
EvpackResourceReader.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
7#include "asset/Evpack.h"
9
10namespace eve::asset {
11
15 std::uint32_t chunkId = 0;
16 std::vector<std::uint8_t> bytes;
17};
18
27
30public:
32 explicit EvpackResourceReader(std::shared_ptr<const Evpack> pack) : pack_(std::move(pack)) {}
37 [[nodiscard]] Result<PersistentId> buildId() const {
38 if (!pack_)
40 Diagnostic::error(DiagnosticCode::InvalidArgument, "asset reader has no admitted package"));
41 return Result<PersistentId>::success(pack_->buildId());
42 }
43
52 const AssetRef& asset, std::string_view expectedType,
53 const EvpackCapabilities& capabilities, std::uint64_t maximumDecodedBytes) const;
54
63 [[nodiscard]] Result<std::vector<AssetRef>> listAssets(
64 std::string_view expectedType, const EvpackCapabilities& capabilities,
65 std::uint32_t maximumAssets = 1'000'000) const;
66
67private:
68 std::shared_ptr<const Evpack> pack_;
69};
70
71} // namespace eve::asset
Versioned random-access runtime package produced by the asset cooker.
#define EVENGINE_API_FOUNDATION
每个链接组(link group)各自的导出宏。
Definition Export.h:106
std::function< Numbers(b3JointId)> read
ActionGuidePack pack
Strong asset, definition, object and generic resource references.
Stable asset identity backed by PersistentId.
Definition ResourceRef.h:53
Move-only operation result carrying either a value or Status.
Definition Result.h:176
Immutable reader retaining an admitted pack by shared ownership.
EvpackResourceReader(std::shared_ptr< const Evpack > pack)
Bind an admitted package; null is rejected by read.
Result< PersistentId > buildId() const
Copy the deterministic build identity of the admitted immutable package.
EvpackChunkKind
Semantic role of a runtime chunk.
Definition Evpack.h:26
Actual runtime device capabilities used for variant selection.
Definition Evpack.h:92
Result of ordered capability variant selection.
Definition Evpack.h:155
One decoded runtime chunk with its admitted semantic metadata.
std::vector< std::uint8_t > bytes
Owning backend-neutral payload returned to a domain decoder.
std::vector< RuntimeAssetChunk > chunks