60 lines
2.2 KiB
Text
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: [],
|
|
}
|