Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // =============================================================================
- // Define the configs
- #define CFG(TYPE, SECT, NAME, DESCR, DEFAULT) \
- TYPE##config SECT##_##NAME (CFGSECTNAME (SECT), DESCR, \
- DEFAULT, #NAME, #SECT "_" #NAME, #TYPE, #DEFAULT);
- #define SECT(...)
- #include "cfgdef.h"
- #undef CFG
- #undef SECT
- // =============================================================================
- config* config::pointers[] = {
- #define CFG(TYPE, SECT, NAME, DESCR, DEFAULT) &SECT##_##NAME,
- #define SECT(...)
- #include "cfgdef.h"
- #undef CFG
- #undef SECT
- };
- // =============================================================================
- const char* config::sections[] = {
- #define CFG(...)
- #define SECT(A,B) #A,
- #include "cfgdef.h"
- #undef CFG
- #undef SECT
- };
- // =============================================================================
- const char* config::sectionNames[] = {
- #define CFG(...)
- #define SECT(A,B) #B,
- #include "cfgdef.h"
- #undef CFG
- #undef SECT
- };
Advertisement
Add Comment
Please, Sign In to add comment