Commit 1b945f95 authored by Sebastian Holtermann's avatar Sebastian Holtermann

cmPropertyMap: Add RemoveProperty method

The new `cmPropertyMap::RemoveProperty` allows to remove a property from the
map.
parent e0a8ff31
...@@ -36,6 +36,11 @@ void cmPropertyMap::AppendProperty(const std::string& name, const char* value, ...@@ -36,6 +36,11 @@ void cmPropertyMap::AppendProperty(const std::string& name, const char* value,
} }
} }
void cmPropertyMap::RemoveProperty(const std::string& name)
{
Map_.erase(name);
}
const char* cmPropertyMap::GetPropertyValue(const std::string& name) const const char* cmPropertyMap::GetPropertyValue(const std::string& name) const
{ {
{ {
......
...@@ -14,17 +14,25 @@ class cmPropertyMap ...@@ -14,17 +14,25 @@ class cmPropertyMap
{ {
public: public:
// -- General // -- General
//! Clear property list //! Clear property list
void Clear(); void Clear();
// -- Properties // -- Properties
//! Set the property value
void SetProperty(const std::string& name, const char* value); void SetProperty(const std::string& name, const char* value);
//! Append to the property value
void AppendProperty(const std::string& name, const char* value, void AppendProperty(const std::string& name, const char* value,
bool asString = false); bool asString = false);
//! Get the property value
const char* GetPropertyValue(const std::string& name) const; const char* GetPropertyValue(const std::string& name) const;
//! Remove the property @a name from the map
void RemoveProperty(const std::string& name);
// -- Lists // -- Lists
//! Get a sorted list of property keys //! Get a sorted list of property keys
std::vector<std::string> GetKeys() const; std::vector<std::string> GetKeys() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment