cmPropertyDefinition.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 "cmProperty.h"
  13. /** \class cmPropertyDefinition
  14. * \brief Property meta-information
  15. *
  16. * This class contains the following meta-information about property:
  17. * - Name;
  18. * - Various documentation strings;
  19. * - The scope of the property;
  20. * - If the property is chained.
  21. */
  22. class cmPropertyDefinition
  23. {
  24. public:
  25. /// Define this property
  26. void DefineProperty(const char *name, cmProperty::ScopeType scope,
  27. const char *ShortDescription,
  28. const char *FullDescription,
  29. bool chained);
  30. /// Default constructor
  31. cmPropertyDefinition() { this->Chained = false; };
  32. /// Is the property chained?
  33. bool IsChained() const { return this->Chained; };
  34. /// Get the scope
  35. cmProperty::ScopeType GetScope() const {
  36. return this->Scope; };
  37. /// Get the documentation (short version)
  38. const std::string &GetShortDescription() const {
  39. return this->ShortDescription; };
  40. /// Get the documentation (full version)
  41. const std::string &GetFullDescription() const {
  42. return this->FullDescription; };
  43. protected:
  44. std::string Name;
  45. std::string ShortDescription;
  46. std::string FullDescription;
  47. cmProperty::ScopeType Scope;
  48. bool Chained;
  49. };
  50. #endif