1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
5 #include "cmConfigure.h" // IWYU pragma: keep
8 #include <unordered_map>
14 /** \class cmPropertyMap
15 * \brief String property map.
22 //! Clear property list
27 //! Set the property value
28 void SetProperty(const std::string
& name
, cmValue value
);
29 void SetProperty(const std::string
& name
, const std::string
& value
)
31 this->SetProperty(name
, cmValue(value
));
34 //! Append to the property value
35 void AppendProperty(const std::string
& name
, const std::string
& value
,
36 bool asString
= false);
38 //! Get the property value
39 cmValue
GetPropertyValue(const std::string
& name
) const;
41 //! Remove the property @a name from the map
42 void RemoveProperty(const std::string
& name
);
46 //! Get a sorted list of property keys
47 std::vector
<std::string
> GetKeys() const;
49 //! Get a sorted by key list of property key,value pairs
50 std::vector
<std::pair
<std::string
, std::string
>> GetList() const;
53 std::unordered_map
<std::string
, std::string
> Map_
;