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