¡@

Home 

c++ Programming Glossary: command_table

Real-world use of X-Macros

http://stackoverflow.com/questions/6635851/real-world-use-of-x-macros

comms table containing each command name and code #define COMMAND_TABLE ENTRY RESERVED reserved 0x00 ENTRY COMMAND1 command1 0x01 ENTRY.. code enumeration enum #define ENTRY a b c a##_CMD c COMMAND_TABLE #undef ENTRY I can define my command length enumeration enum.. enum #define ENTRY a b c a##_CMD_LENGTH sizeof b##_cmd_t COMMAND_TABLE #undef ENTRY I can define my response length enumeration enum..