cmPropertyDefinition.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. const char *DocumentationSection,
  30. bool chained);
  31. /// Get the documentation string
  32. cmDocumentationEntry GetDocumentation() const;
  33. /// Default constructor
  34. cmPropertyDefinition() { this->Chained = false; };
  35. /// Is the property chained?
  36. bool IsChained() const { return this->Chained; };
  37. /// Get the section if any
  38. const std::string &GetDocumentationSection() const {
  39. return this->DocumentationSection; };
  40. /// Get the scope
  41. cmProperty::ScopeType GetScope() const {
  42. return this->Scope; };
  43. /// Get the documentation (short version)
  44. const std::string &GetShortDescription() const {
  45. return this->ShortDescription; };
  46. /// Get the documentation (full version)
  47. const std::string &GetFullDescription() const {
  48. return this->FullDescription; };
  49. protected:
  50. std::string Name;
  51. std::string ShortDescription;
  52. std::string FullDescription;
  53. std::string DocumentationSection;
  54. cmProperty::ScopeType Scope;
  55. bool Chained;
  56. };
  57. #endif