If your listed values ββare dense enough, you can define an array to store the strings and just view them (use NULL for any missing value and add a special case handler to your search procedure).
char *DogList[] = { "vizsla", NULL, NULL, NULL, "terrier", ... };
This is inefficient for sparse enumerations.
Even if the enumeration is not dense, you can use an array of structures to store the display.
typedef struct DogMaps { DogType index; char * name; } DogMapt; DogMapt DogMap[] = { {kVizsla, "vizsla"}, {kTerrier, "terrier"}, {kYellowLab, "yellow lab"}, NULL };
The second approach is very flexible, but that means searching through matching every time you need to use data. For large datasets, consider a b-tree or hash instead of an array.
Any method can be generalized to connect more data. In the first case, use an array of structures, in the second just add more members to the structure.
Of course, you will want to write various handlers to simplify your interaction with these data structures.
@Hershi Anyway, separate code and data. The above examples should be clear, not functional.
I am blushing to admit that for this purpose I still use separate separated spaces, not the type of structured input that you show, but my production code will read as much data as possible from external sources.
Wait, I see what you mean by code generation.
Sure. Nothing wrong with that.
I suspect the OP was interested in how the generated code should look ...