cmGhsMultiGpj.cxx 964 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #include "cmGhsMultiGpj.h"
  4. #include <ostream>
  5. static const char* GHS_TAG[] = { "[INTEGRITY Application]",
  6. "[Library]",
  7. "[Project]",
  8. "[Program]",
  9. "[Reference]",
  10. "[Subproject]" };
  11. const char* GhsMultiGpj::GetGpjTag(Types gpjType)
  12. {
  13. char const* tag;
  14. switch (gpjType) {
  15. case INTERGRITY_APPLICATION:
  16. case LIBRARY:
  17. case PROJECT:
  18. case PROGRAM:
  19. case REFERENCE:
  20. case SUBPROJECT:
  21. tag = GHS_TAG[gpjType];
  22. break;
  23. default:
  24. tag = "";
  25. }
  26. return tag;
  27. }
  28. void GhsMultiGpj::WriteGpjTag(Types gpjType, std::ostream& fout)
  29. {
  30. char const* tag;
  31. tag = GhsMultiGpj::GetGpjTag(gpjType);
  32. fout << tag << std::endl;
  33. }