载入中...
搜索中...
未找到
EvpackPointGraphLoader.cpp
浏览该文件的文档.
40 DiagnosticCode::ParseError, "PCG definition or execution plan is missing", {}, {}, "asset.procgen"));
59 Diagnostic::error(DiagnosticCode::ParseError, "PCG runtime metadata is invalid", {}, {}, "asset.procgen"));
61 const std::string planText(reinterpret_cast<const char*>(plan->bytes.data()), plan->bytes.size());
64 Diagnostic::error(DiagnosticCode::ParseError, "PCG execution plan is invalid: " + graph->getError(), {}, {},
68 DiagnosticCode::ParseError, "PCG output node does not exist", "$.outputNode", {}, "asset.procgen"));
83 DiagnosticCode::ParseError, "bound PCG graph is invalid: " + graph->getError(), {}, {}, "asset.procgen"));
Runtime binding for compiled PCG assets.
JSON-free versioned runtime metadata codec.
Owning, renderer-independent dynamic values.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
const std::string & asString() const
Return the string payload; the caller must have checked the kind.
Definition Value.cpp:87
std::int64_t asInt() const
Return the Int64 payload; the caller must have checked the kind.
Definition Value.cpp:69
const T * getIf() const noexcept
Return a typed pointer, or nullptr when the kind differs.
Definition Value.h:180
Result< RuntimeAssetPayload > read(const AssetRef &asset, std::string_view expectedType, const EvpackCapabilities &capabilities, std::uint64_t maximumDecodedBytes) const
Resolve, type-check, variant-select and decode a canonical runtime asset.
Definition EvpackResourceReader.cpp:10
Result< LoadedPointGraph > load(const AssetRef &graph, const asset::EvpackCapabilities &capabilities, const procgen::SpatialData &terrain, std::uint64_t maximumDecodedBytes=64ull *1024ull *1024ull) const
Load, validate and bind every declared terrain slot transactionally.
Definition EvpackPointGraphLoader.cpp:18
Queryable spatial input for procedural pipelines.
Definition SpatialData.h:35
Result< Value > decodeRuntimeDefinition(std::span< const std::uint8_t > bytes, const RuntimeDefinitionLimits &limits)
Decode a bounded EVDEF\0\1 metadata tree without a JSON parser.
Definition RuntimeDefinition.cpp:246
@ Definition
std::variant< std::monostate, std::int64_t, double, std::string, bool > Value
Definition Database.h:26
const EditorValue * field(const EditorValue &value, const char *name)
Definition RoadNetworkEditTarget.cpp:15
@ ParseError
@ Conflict
Actual runtime device capabilities used for variant selection.
Definition Evpack.h:92
One decoded runtime chunk with its admitted semantic metadata.
Definition EvpackResourceReader.h:13
std::vector< std::uint8_t > bytes
Definition EvpackResourceReader.h:16
Structural and allocation limits for untrusted EVDEF metadata.
Definition RuntimeDefinition.h:17
std::uint64_t maximumBytes
Definition RuntimeDefinition.h:18