Bidirectional table mapping integer IDs in scopesession files to object pointers.
More...
|
uintptr_t | emplace (void *p) |
| Store a new object in the table. More...
|
|
void | emplace (uintptr_t id, void *p) |
| Store a new object in the table using a specific ID. More...
|
|
bool | HasID (void *p) |
| Checks if we have an object at a specific pointer. More...
|
|
bool | HasID (uintptr_t id) |
| Checks if we have an object with a specific ID. More...
|
|
void | ReserveID (uintptr_t id) |
| Marks an ID as unavailable for use, without assigning an pointer to it.
|
|
void | clear () |
| Deletes all entries from the table.
|
|
forwardType::const_iterator | begin () |
| Get an iterator to the start of the forward map.
|
|
forwardType::const_iterator | end () |
| Get an iterator to the end of the forward map.
|
|
void | emplace (uintptr_t a, void * b) |
| Adds a new entry to the bijection. More...
|
|
const uintptr_t & | operator[] (void * key) |
| Looks up an object in the reverse direction. More...
|
|
const void * & | operator[] (uintptr_t key) |
| Looks up an object in the forward direction. More...
|
|
bool | HasEntry (uintptr_t key) |
| Determines if an object is present in the forward mapping. More...
|
|
bool | HasEntry (void * key) |
| Determines if an object is present in the reverse mapping. More...
|
|
void | clear () |
| Erase all entries in the bijection.
|
|
void | erase (uintptr_t key) |
| Erase an entry given a forward key. More...
|
|
void | erase (void * key) |
| Erase an entry given a reverse key. More...
|
|
void | replace (void * oldval, void * newval) |
| Replaces one value with another, keeping the keys identical.
|
|
size_t | size () |
| Return the number of entries in the bijection.
|
|
Bidirectional table mapping integer IDs in scopesession files to object pointers.
No type information is stored, the caller is responsible for knowing what type of object is being stored in the table.
TODO: can we store RTTI info along with the objects to sanity check that we're using the right kind of object