32 IdentifierHash(ExecutionEngine *engine);
44 void add(
const QString &str,
int value) { addEntry(toIdentifier(str), value); }
45 void add(Heap::String *str,
int value) { addEntry(toIdentifier(str), value); }
47 int value(
const QString &str)
const {
return lookup(toIdentifier(str)); }
48 int value(Heap::String *str)
const {
return lookup(toIdentifier(str)); }
50 template<
typename String>
51 String
key(
int value)
const {
return toString<String>(reverseLookup(value)); }
54 void addEntry(PropertyKey i,
int value);
56 int lookup(PropertyKey identifier)
const;
57 PropertyKey reverseLookup(
int value)
const;
59 PropertyKey toIdentifier(
const QString &str)
const;
60 PropertyKey toIdentifier(Heap::String *str)
const;
62 template<
typename String>
63 String toString(PropertyKey key)
const;