enums_getText.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. /* enums_getText.h
  2. *
  3. * Copyright (C) 2007,2015,2017 Paul Boersma
  4. *
  5. * This code is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * This code is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. * See the GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this work. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /* See enums.h */
  19. /* For C++ files. */
  20. #undef enums_begin
  21. #undef enums_add
  22. #undef enums_alt
  23. #undef enums_end
  24. #define enums_begin(kType,minimum) conststring32 kType##_getText (kType testValue) { return
  25. #define enums_add(kType,value,which,text) testValue == kType::which ? text :
  26. #define enums_alt(kType,which,text)
  27. #define enums_end(kType,maximum,def) kType##_getText (kType::DEFAULT); }
  28. /* End of file enums_getText.h */