arezey

Untitled

Mar 3rd, 2013
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.99 KB | None | 0 0
  1. // =============================================================================
  2. // Define the configs
  3. #define CFG(TYPE, SECT, NAME, DESCR, DEFAULT) \
  4.     TYPE##config SECT##_##NAME (CFGSECTNAME (SECT), DESCR, \
  5.         DEFAULT, #NAME, #SECT "_" #NAME, #TYPE, #DEFAULT);
  6.  
  7. #define SECT(...)
  8.  #include "cfgdef.h"
  9. #undef CFG
  10. #undef SECT
  11.  
  12. // =============================================================================
  13. config* config::pointers[] = {
  14. #define CFG(TYPE, SECT, NAME, DESCR, DEFAULT) &SECT##_##NAME,
  15. #define SECT(...)
  16.  #include "cfgdef.h"
  17. #undef CFG
  18. #undef SECT
  19. };
  20.  
  21. // =============================================================================
  22. const char* config::sections[] = {
  23. #define CFG(...)
  24. #define SECT(A,B) #A,
  25.  #include "cfgdef.h"
  26. #undef CFG
  27. #undef SECT
  28. };
  29.  
  30. // =============================================================================
  31. const char* config::sectionNames[] = {
  32. #define CFG(...)
  33. #define SECT(A,B) #B,
  34.  #include "cfgdef.h"
  35. #undef CFG
  36. #undef SECT
  37. };
Advertisement
Add Comment
Please, Sign In to add comment