VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Functions
updateSenderHelpers.h File Reference

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 > &current)
 

Function Documentation

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 
)

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)

Template Parameters
SnapshotTypeSnapshot struct with a uuid string member.
FilterFnCallable (const SnapshotType&) -> bool; return false to skip.
ApplyModsFnCallable (const SnapshotType&) -> SnapshotType.
ToJsonFnCallable (const SnapshotType&) -> Json::Value.

References DtChangedItem< SnapshotType >::cachedJson, DtSerialization::DtJsonSerializer::hasChanges(), DtChangedItem< SnapshotType >::isNew, DtChangedItem< SnapshotType >::snapshot, and ImGui::Value().

std::vector<std::string> DtComputeDeletedNames ( const std::set< std::string > &  known,
const std::set< std::string > &  current 
)
inline

Return names present in known but absent from current.


Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)