xo-umbrella2/xo-reflectable2/idl/Reflectable.json5
Roland Conybeare 20d9997f09
Some checks failed
cmake-docker / cmake-build (clang, clang++) (push) Failing after 12m19s
cmake-docker / cmake-build (gcc, g++) (push) Failing after 11m29s
CI / smoke-test (push) Successful in 59m0s
x-object2: reflectable + printjson for DFloat [FEATURE]
2026-09-12 23:16:06 -04:00

60 lines
2.2 KiB
Text

{
mode: "facet",
output_cpp_dir: "src/reflectable2",
output_hpp_dir: "include/xo/reflectable2",
output_impl_subdir: "detail",
includes: ["<xo/reflect/TaggedPtr.hpp>"],
user_hpp_includes: [
],
namespace1: "xo",
namespace2: "reflect",
pretext: [],
facet: "Reflectable",
detail_subdir: "detail",
brief: "fomo objects that participate in reflection",
using_doxygen: true,
doc: [
"Opt-in capability for faceted objects that can be interrogated at runtime.",
"Counterpart to xo::reflect::SelfTagging, which solves the same",
"get-me-the-real-type-at-runtime problem for non-fomo objects.",
"A representation opts in by implementing IReflectable_DRepr, whose",
"self_tp() hands back a TaggedPtr for itself. FopTdx rotates an",
"erased obj<AFacet> here through FacetRegistry to recover it.",
"NOTE the TaggedPtr does not keep the object alive: fomo objects are",
"arena-allocated rather than refcounted, so validity belongs to the",
"owning flywheel. Fine for synchronous traversal; a caller must not",
"retain one past the arena."
],
types: [
{
name: "obj_AReflectable",
doc: [],
definition: "xo::facet::obj<AReflectable>",
},
// NB an implementation's generated header aliases only the types
// listed here, so self_tp()'s return type must appear.
{
name: "TaggedPtr",
doc: ["reflect's (TypeDescr, address) pair"],
definition: "xo::reflect::TaggedPtr",
}
],
const_methods: [],
nonconst_methods: [
// TaggedPtr self_tp()
//
// NONCONST, matching xo::reflect::SelfTagging::self_tp(): a TaggedPtr
// holds a non-const void*, so a const method -- which sees only
// `const DRepr &` -- could not produce one.
{
name: "self_tp",
doc: ["TaggedPtr for this object's concrete representation"],
return_type: "TaggedPtr",
args: [],
const: false,
noexcept: false,
attributes: [],
},
],
router_facet_explicit_content: [],
}