[#MRDOCS_KIND_ENTRY] = MRDOCS_KIND_ENTRY :mrdocs: Emit the describe entry for one derived kind. == Synopsis Declared in `<mrdocs/Support/Reflection/Describe.hpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- #define MRDOCS_KIND_ENTRY(C, D) ---- == Description Use it between `MRDOCS_DESCRIBE_KINDS_BEGIN` and `MRDOCS_DESCRIBE_KINDS_END`, one per derived class. Usually the X‐macro `INFO` points at it, so an `.inc` file with one `INFO(Name)` per kind supplies the entries: [,cpp] ---- #define INFO(Name) MRDOCS_KIND_ENTRY(Shape, Name##Shape) MRDOCS_DESCRIBE_KINDS_BEGIN(Shape) #include "ShapeNodes.inc" MRDOCS_DESCRIBE_KINDS_END(Shape) ---- You can also write the entries by hand: [,cpp] ---- struct Node { int Kind; }; struct Leaf : Node {}; struct Branch : Node {}; MRDOCS_DESCRIBE_KINDS_BEGIN(Node) MRDOCS_KIND_ENTRY(Node, Leaf) MRDOCS_KIND_ENTRY(Node, Branch) MRDOCS_DESCRIBE_KINDS_END(Node) ---- Each entry is a leading comma plus a descriptor object, which becomes one more argument of the call that `MRDOCS_DESCRIBE_KINDS_BEGIN` opens: [,cpp] ---- // MRDOCS_KIND_ENTRY(Node, Leaf) expands to exactly: , ::mrdocs::describe::detail::kind_descriptor{} ---- Because of that leading comma it only makes sense in that spot. Don't put a `;` after it, and don't use it with `MRDOCS_DESCRIBE_KINDS`, which writes its own entries. `D` may still be a forward declaration here. == Parameters [cols="1,4"] |=== | Name| Description | *C* | The polymorphic base class, the same one passed to `MRDOCS_DESCRIBE_KINDS_BEGIN`. | *D* | The derived class. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#