cmPropertyDefinition.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 cmPropertyDefinition_h
  4. #define cmPropertyDefinition_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <string>
  7. #include "cmProperty.h"
  8. /** \class cmPropertyDefinition
  9. * \brief Property meta-information
  10. *
  11. * This class contains the following meta-information about property:
  12. * - Name;
  13. * - Various documentation strings;
  14. * - The scope of the property;
  15. * - If the property is chained.
  16. */
  17. class cmPropertyDefinition
  18. {
  19. public:
  20. /// Constructor
  21. cmPropertyDefinition(std::string name, cmProperty::ScopeType scope,
  22. std::string ShortDescription,
  23. std::string FullDescription, bool chained = false);
  24. /// Is the property chained?
  25. bool IsChained() const { return this->Chained; }
  26. /// Get the scope
  27. cmProperty::ScopeType GetScope() const { return this->Scope; }
  28. /// Get the documentation (short version)
  29. const std::string& GetShortDescription() const
  30. {
  31. return this->ShortDescription;
  32. }
  33. /// Get the documentation (full version)
  34. const std::string& GetFullDescription() const
  35. {
  36. return this->FullDescription;
  37. }
  38. protected:
  39. std::string Name;
  40. std::string ShortDescription;
  41. std::string FullDescription;
  42. cmProperty::ScopeType Scope;
  43. bool Chained;
  44. };
  45. #endif