|
| StringMap () |
|
| StringMap (unsigned InitialSize) |
|
| StringMap (AllocatorTy A) |
|
| StringMap (unsigned InitialSize, AllocatorTy A) |
|
| StringMap (std::initializer_list< std::pair< std::string_view, ValueTy > > List) |
|
| StringMap (StringMap &&RHS) |
|
| StringMap (const StringMap &RHS) |
|
StringMap & | operator= (StringMap RHS) |
|
| ~StringMap () |
|
AllocatorTy & | getAllocator () |
|
const AllocatorTy & | getAllocator () const |
|
iterator | begin () |
|
iterator | end () |
|
const_iterator | begin () const |
|
const_iterator | end () const |
|
iterator_range< StringMapKeyIterator< ValueTy > > | keys () const |
|
iterator | find (std::string_view Key) |
|
const_iterator | find (std::string_view Key) const |
|
ValueTy | lookup (std::string_view Key) const |
| lookup - Return the entry for the specified key, or a default constructed value if no such entry exists. More...
|
|
ValueTy & | operator[] (std::string_view Key) |
| Lookup the ValueTy for the Key , or create a default constructed value if the key is not in the map. More...
|
|
size_type | count (std::string_view Key) const |
| count - Return 1 if the element is in the map, 0 otherwise. More...
|
|
template<typename InputTy > |
size_type | count (const StringMapEntry< InputTy > &MapEntry) const |
|
bool | operator== (const StringMap &RHS) const |
| equal - check whether both of the containers are equal. More...
|
|
bool | operator!= (const StringMap &RHS) const |
|
bool | insert (MapEntryTy *KeyValue) |
| insert - Insert the specified key/value pair into the map. More...
|
|
std::pair< iterator, bool > | insert (std::pair< std::string_view, ValueTy > KV) |
| insert - Inserts the specified key/value pair into the map if the key isn't already in the map. More...
|
|
template<typename InputIt > |
void | insert (InputIt First, InputIt Last) |
| Inserts elements from range [first, last). More...
|
|
void | insert (std::initializer_list< std::pair< std::string_view, ValueTy > > List) |
| Inserts elements from initializer list ilist. More...
|
|
template<typename V > |
std::pair< iterator, bool > | insert_or_assign (std::string_view Key, V &&Val) |
| Inserts an element or assigns to the current element if the key already exists. More...
|
|
template<typename... ArgsTy> |
std::pair< iterator, bool > | try_emplace (std::string_view Key, ArgsTy &&... Args) |
| Emplace a new element for the specified key into the map if the key isn't already in the map. More...
|
|
void | clear () |
|
void | remove (MapEntryTy *KeyValue) |
| remove - Remove the specified key/value pair from the map, but do not erase it. More...
|
|
void | erase (iterator I) |
|
bool | erase (std::string_view Key) |
|
unsigned | getNumBuckets () const |
|
unsigned | getNumItems () const |
|
bool | empty () const |
|
unsigned | size () const |
|
void | swap (StringMapImpl &Other) |
|
template<typename ValueTy, typename AllocatorTy = MallocAllocator>
class wpi::StringMap< ValueTy, AllocatorTy >
StringMap - This is an unconventional map that is specialized for handling keys that are "strings", which are basically ranges of bytes.
This does some funky memory allocation and hashing things to make it extremely efficient, storing the string data after the value in the map.
template<typename ValueTy , typename AllocatorTy = MallocAllocator>
template<typename InputIt >
void wpi::StringMap< ValueTy, AllocatorTy >::insert |
( |
InputIt |
First, |
|
|
InputIt |
Last |
|
) |
| |
|
inline |
Inserts elements from range [first, last).
If multiple elements in the range have keys that compare equivalent, it is unspecified which element is inserted .
template<typename ValueTy , typename AllocatorTy = MallocAllocator>
template<typename... ArgsTy>
Emplace a new element for the specified key into the map if the key isn't already in the map.
The bool component of the returned pair is true if and only if the insertion takes place, and the iterator component of the pair points to the element with key equivalent to the key of the pair.