packaging: Initial packaging
[platform/upstream/cmake.git] / Source / cmProperty.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 cmProperty_h
13 #define cmProperty_h
14
15 #include "cmStandardIncludes.h"
16
17 class cmProperty
18 {
19 public:
20   enum ScopeType { TARGET, SOURCE_FILE, DIRECTORY, GLOBAL, CACHE,
21                    TEST, VARIABLE, CACHED_VARIABLE };
22
23   // set this property
24   void Set(const char *name, const char *value);
25
26   // append to this property
27   void Append(const char *name, const char *value, bool asString = false);
28
29   // get the value
30   const char *GetValue() const;
31
32   // construct with the value not set
33   cmProperty() { this->ValueHasBeenSet = false; };
34
35 protected:
36   std::string Name;
37   std::string Value;
38   bool ValueHasBeenSet;
39 };
40
41 #endif