![]() |
VR-Forces Developer's Guide
|
Go to the source code of this file.
Classes | |
| struct | DtChangedItem< SnapshotType > |
Functions | |
| template<typename SnapshotType , typename FilterFn , typename ApplyModsFn , typename ToJsonFn > | |
| std::pair< std::vector < DtChangedItem< SnapshotType > >, std::set< std::string >> | DtDetectChangedItems (const std::vector< SnapshotType > &snapshots, const std::set< std::string > &knownSet, const std::map< std::string, Json::Value > &lastSentAttrs, FilterFn filter, ApplyModsFn applyMods, ToJsonFn toJson) |
| std::vector< std::string > | DtComputeDeletedNames (const std::set< std::string > &known, const std::set< std::string > ¤t) |
| std::pair< std::vector<DtChangedItem<SnapshotType> >, std::set<std::string>> DtDetectChangedItems | ( | const std::vector< SnapshotType > & | snapshots, |
| const std::set< std::string > & | knownSet, | ||
| const std::map< std::string, Json::Value > & | lastSentAttrs, | ||
| FilterFn | filter, | ||
| ApplyModsFn | applyMods, | ||
| ToJsonFn | toJson | ||
| ) |
Inspect snapshots against knownSet and lastSentAttrs, apply filter and applyMods to each item, and return: .first — items that changed (paired with isNew flag) .second — set of UUIDs present in this tick (used for deletion detection)
| SnapshotType | Snapshot struct with a uuid string member. |
| FilterFn | Callable (const SnapshotType&) -> bool; return false to skip. |
| ApplyModsFn | Callable (const SnapshotType&) -> SnapshotType. |
| ToJsonFn | Callable (const SnapshotType&) -> Json::Value. |
References DtChangedItem< SnapshotType >::cachedJson, DtSerialization::DtJsonSerializer::hasChanges(), DtChangedItem< SnapshotType >::isNew, DtChangedItem< SnapshotType >::snapshot, and ImGui::Value().
|
inline |
Return names present in known but absent from current.