Vector that assigns a sequential base‐1 ID to each unique entry.
Synopsis
Declared in <llvm/ADT/UniqueVector.h>
template<class T>
class UniqueVector;
Description
T is the type of entries in the vector. T should have implementations of operator== and of operator<. Entries can be fetched using operator[]with the entry ID.
Type Aliases
Name |
Description |
Underlying contiguous storage of unique entries in insertion order. |
|
Const iterator over the stored entries. |
|
Mutable iterator over the stored entries. |
Member Functions
Name |
Description |
Return an iterator to the start of the vector. |
|
empty ‐ Returns true if the vector is empty. |
|
Return an iterator to the end of the vector. |
|
idFor ‐ return the ID for an existing entry. Returns 0 if the entry is not found. |
|
insert ‐ Append entry to the vector if it doesn't already exist. Returns the entry's index + 1 to be used as a unique ID. |
|
operator[]‐ Returns a reference to the entry with the specified ID. |
|
reset ‐ Clears all the entries. |
|
size ‐ Returns the number of entries in the vector. |
Created with MrDocs