cmPropertyMap.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 cmPropertyMap_h
  11. #define cmPropertyMap_h
  12. #include "cmProperty.h"
  13. class cmake;
  14. class cmPropertyMap : public std::map<cmStdString,cmProperty>
  15. {
  16. public:
  17. cmProperty *GetOrCreateProperty(const std::string& name);
  18. void SetProperty(const std::string& name, const char *value,
  19. cmProperty::ScopeType scope);
  20. void AppendProperty(const std::string& name, const char* value,
  21. cmProperty::ScopeType scope, bool asString=false);
  22. const char *GetPropertyValue(const std::string& name,
  23. cmProperty::ScopeType scope,
  24. bool &chain) const;
  25. void SetCMakeInstance(cmake *cm) { this->CMakeInstance = cm; };
  26. cmPropertyMap() { this->CMakeInstance = 0;};
  27. private:
  28. cmake *CMakeInstance;
  29. };
  30. #endif