Unique reference identifier within a BRepGraph.
Identity = (RefKind, Counter). Generation is excluded from equality/hash. Counter 0 is an invalid sentinel.
Serialization Contract
Entity UIDs (BRepGraph_UID) and reference UIDs (BRepGraph_RefUID) share a single monotonic counter (BRepGraph_Data::myNextUIDCounter). To persist a BRepGraph across sessions:
- Write: for each reference entry, serialize (RefKind, Counter, OwnGen).
- Read: reconstruct reference entries, populate RefUID vectors with deserialized (RefKind, Counter) values, set myNextUIDCounter to max(all_entity_counters, all_ref_counters) + 1.
- myGeneration resets to 0 on load (session-scoped).
- VersionStamps from a previous session will correctly detect staleness via Generation mismatch.