cmDocumentationEntry.h 756 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmDocumentationEntry_h
  4. #define cmDocumentationEntry_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <string>
  7. /** Standard documentation entry for cmDocumentation's formatting. */
  8. struct cmDocumentationEntry
  9. {
  10. std::string Name;
  11. std::string Brief;
  12. cmDocumentationEntry() {}
  13. cmDocumentationEntry(const char* doc[2])
  14. {
  15. if (doc[0]) {
  16. this->Name = doc[0];
  17. }
  18. if (doc[1]) {
  19. this->Brief = doc[1];
  20. }
  21. }
  22. cmDocumentationEntry(const char* n, const char* b)
  23. {
  24. if (n) {
  25. this->Name = n;
  26. }
  27. if (b) {
  28. this->Brief = b;
  29. }
  30. }
  31. };
  32. #endif