[#MRDOCS_ENUM_ENTRY] = MRDOCS_ENUM_ENTRY :mrdocs: Emit the describe entry for one enumerator. == Synopsis Declared in `<mrdocs/Support/Reflection/Describe.hpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- #define MRDOCS_ENUM_ENTRY(E, e) ---- == Description Use it between `MRDOCS_DESCRIBE_ENUM_BEGIN` and `MRDOCS_DESCRIBE_ENUM_END`, usually by pointing the X‐macro `INFO` at it before including the `.inc` file that lists the enumerators: [,cpp] ---- MRDOCS_DESCRIBE_ENUM_BEGIN(ShapeKind) #define INFO(Name) MRDOCS_ENUM_ENTRY(ShapeKind, Name) #include "ShapeNodes.inc" MRDOCS_DESCRIBE_ENUM_END(ShapeKind) ---- You can also write the entries by hand: [,cpp] ---- enum class Dir { Up, Down }; MRDOCS_DESCRIBE_ENUM_BEGIN(Dir) MRDOCS_ENUM_ENTRY(Dir, Up) MRDOCS_ENUM_ENTRY(Dir, Down) MRDOCS_DESCRIBE_ENUM_END(Dir) ---- Each entry is one comma‐prefixed descriptor argument: [,cpp] ---- // MRDOCS_ENUM_ENTRY(Dir, Up) , ::mrdocs::describe::detail::enum_descriptor< Dir::Up, []{ return "Up"; }>{} // The descriptor's `value` is Dir::Up and its `name` is "Up". ---- The leading comma is what lets entries follow the `0` that `MRDOCS_DESCRIBE_ENUM_BEGIN` leaves open, so don't put commas or semicolons between entries. It only makes sense inside that bracket; anywhere else the stray comma is a syntax error. == Parameters [cols="1,4"] |=== | Name| Description | *E* | The enum type. | *e* | The enumerator name, written without the `E::` prefix. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#