载入中...
搜索中...
未找到
PointDelta.cpp
浏览该文件的文档.
59bool attributeRowsEqual(const AttributeTable& left, std::size_t leftRow, const AttributeTable& right,
96 a.colorG == b.colorG && a.colorB == b.colorB && a.colorA == b.colorA && a.steepness == b.steepness;
106 Diagnostic::error(DiagnosticCode::InvalidArgument, "point delta requires non-zero ids", "points.id"));
228 Diagnostic::error(DiagnosticCode::Conflict, "point delta added identity is inconsistent", "added"));
240 Diagnostic::error(DiagnosticCode::Conflict, "point delta contains duplicate removals", "removed"));
253 Diagnostic::error(DiagnosticCode::Conflict, "point delta target order is inconsistent", "targetOrder"));
259 } else if (const auto found = updatedIndex.value().find(id); found != updatedIndex.value().end()) {
267 Diagnostic::error(DiagnosticCode::Conflict, "point delta references an unknown id", "targetOrder"));
274 Diagnostic::error(DiagnosticCode::Conflict, "point delta omits or duplicates points", "targetOrder"));
279 Diagnostic::error(DiagnosticCode::Conflict, "point delta target fingerprint does not match", "delta"));
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::vector< ProcgenPoint > & points() const
Borrow immutable point rows; structural ownership remains with this set.
Definition PointSet.h:212
Result< int > appendPointFrom(const PointSet &source, std::size_t sourceIndex)
Append a point and its attributes from another set.
Definition PointSet.cpp:69
const AttributeTable & attributes() const noexcept
Borrow the authoritative schema-bearing attribute table.
Definition PointSet.h:216
void reserve(std::size_t count)
Reserve point storage without changing point or attribute row counts.
Definition PointSet.cpp:60
Definition EvpackPointGraphLoader.h:12
Result< PointSet > applyPointDelta(const PointSet &base, const PointDelta &delta)
Apply a delta atomically, rejecting stale or internally inconsistent input.
Definition PointDelta.cpp:212
Result< std::uint64_t > fingerprintPointSet(const PointSet &points)
Compute an exact deterministic fingerprint, rejecting missing or duplicate ids.
Definition PointDelta.cpp:140
Result< PointDelta > diffPointSets(const PointSet &before, const PointSet &after)
Compute an identity-based delta without mutating either snapshot.
Definition PointDelta.cpp:179
WidgetDesc row(std::vector< WidgetDesc > children, std::string id)
Horizontal elastic layout row.
Definition Widget.cpp:679
@ InvalidArgument
@ Conflict
Transactional identity-based change set between two point snapshots.
Definition PointDelta.h:16
std::uint64_t targetFingerprint
Fingerprint that the fully applied target snapshot must produce.
Definition PointDelta.h:28
PointSet added
Target-only points, including their complete attribute rows.
Definition PointDelta.h:18
std::vector< std::uint64_t > removed
Base identities absent from the target snapshot.
Definition PointDelta.h:22
std::vector< std::uint64_t > targetOrder
Exact identity order of the target snapshot.
Definition PointDelta.h:24
std::uint64_t baseFingerprint
Fingerprint that the input snapshot must match before application.
Definition PointDelta.h:26