cmPropertyDefinition.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 "cmProperty.h"
  7. #include <string>
  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. /// Define this property
  21. void DefineProperty(const std::string& name, cmProperty::ScopeType scope,
  22. const char* ShortDescription,
  23. const char* FullDescription, bool chained);
  24. /// Default constructor
  25. cmPropertyDefinition() { this->Chained = false; }
  26. /// Is the property chained?
  27. bool IsChained() const { return this->Chained; }
  28. /// Get the scope
  29. cmProperty::ScopeType GetScope() const { return this->Scope; }
  30. /// Get the documentation (short version)
  31. const std::string& GetShortDescription() const
  32. {
  33. return this->ShortDescription;
  34. }
  35. /// Get the documentation (full version)
  36. const std::string& GetFullDescription() const
  37. {
  38. return this->FullDescription;
  39. }
  40. protected:
  41. std::string Name;
  42. std::string ShortDescription;
  43. std::string FullDescription;
  44. cmProperty::ScopeType Scope;
  45. bool Chained;
  46. };
  47. #endif