cmPropertyDefinition.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmPropertyDefinition_h
  11. #define cmPropertyDefinition_h
  12. #include <cmConfigure.h> // IWYU pragma: keep
  13. #include "cmProperty.h"
  14. #include <string>
  15. /** \class cmPropertyDefinition
  16. * \brief Property meta-information
  17. *
  18. * This class contains the following meta-information about property:
  19. * - Name;
  20. * - Various documentation strings;
  21. * - The scope of the property;
  22. * - If the property is chained.
  23. */
  24. class cmPropertyDefinition
  25. {
  26. public:
  27. /// Define this property
  28. void DefineProperty(const std::string& name, cmProperty::ScopeType scope,
  29. const char* ShortDescription,
  30. const char* FullDescription, bool chained);
  31. /// Default constructor
  32. cmPropertyDefinition() { this->Chained = false; }
  33. /// Is the property chained?
  34. bool IsChained() const { return this->Chained; }
  35. /// Get the scope
  36. cmProperty::ScopeType GetScope() const { return this->Scope; }
  37. /// Get the documentation (short version)
  38. const std::string& GetShortDescription() const
  39. {
  40. return this->ShortDescription;
  41. }
  42. /// Get the documentation (full version)
  43. const std::string& GetFullDescription() const
  44. {
  45. return this->FullDescription;
  46. }
  47. protected:
  48. std::string Name;
  49. std::string ShortDescription;
  50. std::string FullDescription;
  51. cmProperty::ScopeType Scope;
  52. bool Chained;
  53. };
  54. #endif