xo-umbrella2/xo-reflectable2
Roland Conybeare 59d483b5e7 xo-reflect + xo-printjson + xo-websock [FEATURE]
xo-reflect: ownership hints for struct members
xo-printjson: use onwership to help decide on expansion vs ref
xo-websock: adapt to adj xo-printjson api
2026-10-10 10:39:59 -04:00
..
cmake xo-reflectable2: new subsystem [FEATURE] [WIP] 2026-09-12 17:06:04 -04:00
idl x-object2: reflectable + printjson for DFloat [FEATURE] 2026-09-12 23:16:06 -04:00
include/xo/reflectable2 xo-reflect + xo-printjson + xo-websock [FEATURE] 2026-10-10 10:39:59 -04:00
src/reflectable2 xo-reflectable2: + AReflectable.self_tp() method [FEATURE] 2026-09-12 19:27:50 -04:00
utest xo-facet: + FacetConfig storage_base_align + ObjectSlot [FEATURE] 2026-09-20 11:22:28 -04:00
CMakeLists.txt xo-reflectable2: + FopTdx<AFacet,DRepr> [WIP] 2026-09-12 17:31:18 -04:00
README.md xo-reflectable2: new subsystem [FEATURE] [WIP] 2026-09-12 17:06:04 -04:00

xo-reflectable2

The AReflectable facet -- reflection for facet-object-model (fomo) data types, so c++ code can interrogate a fomo object at runtime without knowing its representation. First consumer is xo-printjson.

Scaffold. idl/Reflectable.json5 declares no methods, so AReflectable is empty and nothing implements it yet. The method it will carry is self_tp(), returning a xo::reflect::TaggedPtr for the object's concrete representation -- the fomo counterpart to xo::reflect::SelfTagging::self_tp(). Design and remaining tickets: .xo-backlog/reflectable2/.

xo-reflect is deliberately NOT modified by any of this. TypeDescrExtra and EstablishTdx are public extension points, so the fomo-aware pieces can be supplied from here instead. That matters because reflect has far more dependents than facet does, and hosting them in reflect would hand every one of them a dependency on xo-facet:

for s in $(xo-deps --users-of=xo-reflect --format=names -q); do
    xo-deps --why=$s:xo-facet -q >/dev/null || echo "$s"
done

It is scaffolded rather than left as a bare directory so that xo-build --all covers every entry in xo-cmake/etc/xo/subsystem-list; a subsystem listed there but carrying no CMakeLists.txt makes --all fail at the configure step.

Namespace is xo::reflect -- shared with xo-reflect rather than separate, since the facet is part of reflection and its method sits beside SelfTagging's. xo-ppsink and xo-indentlog2 share xo::pp the same way.

To add the method: edit idl/Reflectable.json5, then rebuild -- xo_add_genfacet regenerates include/xo/reflectable2/detail/ and src/reflectable2/IReflectable_Any.cpp, both of which are checked in.