cmProperty.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 cmProperty_h
  11. #define cmProperty_h
  12. #include "cmStandardIncludes.h"
  13. class cmProperty
  14. {
  15. public:
  16. enum ScopeType { TARGET, SOURCE_FILE, DIRECTORY, GLOBAL, CACHE,
  17. TEST, VARIABLE, CACHED_VARIABLE };
  18. // set this property
  19. void Set(const char *name, const char *value);
  20. // append to this property
  21. void Append(const char *name, const char *value, bool asString = false);
  22. // get the value
  23. const char *GetValue() const;
  24. // construct with the value not set
  25. cmProperty() { this->ValueHasBeenSet = false; };
  26. protected:
  27. std::string Name;
  28. std::string Value;
  29. bool ValueHasBeenSet;
  30. };
  31. #endif