Add GetNodeIdex and GetNodeKey methods.

This commit is contained in:
Jonathan Beck
2009-11-04 20:21:54 +01:00
parent c8c9cfa77f
commit 84596548e5
4 changed files with 20 additions and 0 deletions
+10
View File
@@ -177,4 +177,14 @@ void Dictionary::Remove(const std::string& key)
_map.erase(key);
}
std::string Dictionary::GetNodeKey(Node* node)
{
for (iterator it = _map.begin(); it != _map.end(); ++it)
{
if (it->second == node)
return it->first;
}
return "";
}
};