Define RCSW_XTABLE_SEQ_ENUM

Define Documentation

RCSW_XTABLE_SEQ_ENUM(...)

If you have a define like this:

#define myents A,B,C,D,E,F,G,H

Then you can use this macro to generate an enum like so:

enum foo {RCSW_XTABLE_SEQ_ENUM(myents) };

which will result in:

enum foo {A = 0, B = 1, C = 2, D = 3, E = 4, F = 5, G = 6, H = 7}

If you need more than 50 entries, then you can do:

enum foo {
           RCSW_XTABLE_SEQ_ENUM(myents1)
           RCSW_XTABLE_SEQ_ENUM(myents2)
           RCSW_XTABLE_SEQ_ENUM(myents3)
};

in order to get the # of entries you need.