Add reverse vtable name lookup

develop
lethosor 2016-04-03 20:45:44 -04:00
parent a49f313f84
commit 37c81df21c
1 changed files with 12 additions and 0 deletions

@ -148,6 +148,18 @@ namespace DFHack
return 0;
return (void*)i->second;
}
bool getVTableName (const void *vtable, std::string &out) const
{
for (auto i = VTables.begin(); i != VTables.end(); ++i)
{
if ((void*)i->second == vtable)
{
out = i->first;
return true;
}
}
return false;
}
void setOS(const OSType os)
{