add GUIObjectState::remove_property()
This commit is contained in:
parent
a13fabf344
commit
c791d5970f
@ -157,3 +157,13 @@ GUIObjectState::all_ids () const
|
|||||||
}
|
}
|
||||||
return ids;
|
return ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
GUIObjectState::remove_property (const string & id, const string & prop_name)
|
||||||
|
{
|
||||||
|
std::map <std::string, XMLNode*>::iterator i = object_map.find (id);
|
||||||
|
if (i == object_map.end()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
i->second->remove_property (prop_name);
|
||||||
|
}
|
||||||
|
@ -50,6 +50,7 @@ public:
|
|||||||
XMLNode* child = get_or_add_node (id);
|
XMLNode* child = get_or_add_node (id);
|
||||||
child->set_property (prop_name.c_str(), val);
|
child->set_property (prop_name.c_str(), val);
|
||||||
}
|
}
|
||||||
|
void remove_property (const std::string & id, const std:: string & prop_name);
|
||||||
|
|
||||||
/** Remove node with provided id.
|
/** Remove node with provided id.
|
||||||
* @param id property of Object node to look for.
|
* @param id property of Object node to look for.
|
||||||
|
Loading…
Reference in New Issue
Block a user