X-Macros can be used for code generation, by writing repetitive code: iterate over a list to do some tasks, or to declare a set of constants, objects or functions.
Here we use X-macros to declare an enum containing 4 commands and a map of their names as strings
Then we can print the string values ...