LLVM: llvm::UniqueVector< T > Class Template Reference (original) (raw)
UniqueVector - This class produces a sequential ID number (base 1) for each unique entry that is added. More...
#include "[llvm/ADT/UniqueVector.h](UniqueVector%5F8h%5Fsource.html)"
| Public Types | |
|---|---|
| using | VectorType = typename std::vector<T> |
| using | iterator = typename VectorType::iterator |
| using | const_iterator = typename VectorType::const_iterator |
| Public Member Functions | |
|---|---|
| unsigned | insert (const T &Entry) |
| insert - Append entry to the vector if it doesn't already exist. | |
| unsigned | idFor (const T &Entry) const |
| idFor - return the ID for an existing entry. | |
| const T & | operator[] (unsigned ID) const |
| operator[] - Returns a reference to the entry with the specified ID. | |
| iterator | begin () |
| Return an iterator to the start of the vector. | |
| const_iterator | begin () const |
| Return an iterator to the start of the vector. | |
| iterator | end () |
| Return an iterator to the end of the vector. | |
| const_iterator | end () const |
| Return an iterator to the end of the vector. | |
| size_t | size () const |
| size - Returns the number of entries in the vector. | |
| bool | empty () const |
| empty - Returns true if the vector is empty. | |
| void | reset () |
| reset - Clears all the entries. |
template<class T>
class llvm::UniqueVector< T >
UniqueVector - This class produces a sequential ID number (base 1) for each unique entry that is added.
T is the type of entries in the vector. This class should have an implementation of operator== and of operator<. Entries can be fetched using operator[] with the entry ID.
Definition at line 24 of file UniqueVector.h.
◆ const_iterator
◆ iterator
◆ VectorType
◆ begin() [1/2]
Return an iterator to the start of the vector.
Definition at line 75 of file UniqueVector.h.
◆ begin() [2/2]
Return an iterator to the start of the vector.
Definition at line 78 of file UniqueVector.h.
◆ empty()
empty - Returns true if the vector is empty.
Definition at line 90 of file UniqueVector.h.
◆ end() [1/2]
Return an iterator to the end of the vector.
Definition at line 81 of file UniqueVector.h.
◆ end() [2/2]
Return an iterator to the end of the vector.
Definition at line 84 of file UniqueVector.h.
◆ idFor()
idFor - return the ID for an existing entry.
Returns 0 if the entry is not found.
Definition at line 57 of file UniqueVector.h.
◆ insert()
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.
Definition at line 40 of file UniqueVector.h.
◆ operator[]()
operator[] - Returns a reference to the entry with the specified ID.
Definition at line 69 of file UniqueVector.h.
◆ reset()
◆ size()
The documentation for this class was generated from the following file:
- include/llvm/ADT/UniqueVector.h