v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
heap::base::CachedUnorderedMap< _Key, _Value, _Hash > Class Template Referencefinal

#include <cached-unordered-map.h>

Collaboration diagram for heap::base::CachedUnorderedMap< _Key, _Value, _Hash >:

Public Types

using Key = typename MapT::key_type
 
using Mapped = typename MapT::mapped_type
 

Public Member Functions

Mappedoperator[] (const Key &key)
 
MapT::size_type erase (const Key &key)
 
MapT::iterator find (const Key &key)
 
MapT::iterator begin ()
 
MapT::iterator end ()
 
MapT::const_iterator begin () const
 
MapT::const_iterator end () const
 
bool contains (const Key &key) const
 
void clear ()
 
bool empty () const
 
MapT Take ()
 

Private Types

using MapT = absl::flat_hash_map<_Key, _Value, _Hash>
 

Private Attributes

Key last_key_ = nullptr
 
Mappedlast_mapped_ = nullptr
 
MapT map_
 

Detailed Description

template<typename _Key, typename _Value, typename _Hash = v8::base::hash<_Key>>
class heap::base::CachedUnorderedMap< _Key, _Value, _Hash >

Definition at line 17 of file cached-unordered-map.h.

Member Typedef Documentation

◆ Key

template<typename _Key , typename _Value , typename _Hash = v8::base::hash<_Key>>
using heap::base::CachedUnorderedMap< _Key, _Value, _Hash >::Key = typename MapT::key_type

Definition at line 21 of file cached-unordered-map.h.

◆ Mapped

template<typename _Key , typename _Value , typename _Hash = v8::base::hash<_Key>>
using heap::base::CachedUnorderedMap< _Key, _Value, _Hash >::Mapped = typename MapT::mapped_type

Definition at line 22 of file cached-unordered-map.h.

◆ MapT

template<typename _Key , typename _Value , typename _Hash = v8::base::hash<_Key>>
using heap::base::CachedUnorderedMap< _Key, _Value, _Hash >::MapT = absl::flat_hash_map<_Key, _Value, _Hash>
private

Definition at line 18 of file cached-unordered-map.h.

Member Function Documentation

◆ begin() [1/2]

template<typename _Key , typename _Value , typename _Hash = v8::base::hash<_Key>>
MapT::iterator heap::base::CachedUnorderedMap< _Key, _Value, _Hash >::begin ( )
inline

Definition at line 57 of file cached-unordered-map.h.

◆ begin() [2/2]

template<typename _Key , typename _Value , typename _Hash = v8::base::hash<_Key>>
MapT::const_iterator heap::base::CachedUnorderedMap< _Key, _Value, _Hash >::begin ( ) const
inline

Definition at line 59 of file cached-unordered-map.h.

◆ clear()

template<typename _Key , typename _Value , typename _Hash = v8::base::hash<_Key>>
void heap::base::CachedUnorderedMap< _Key, _Value, _Hash >::clear ( )
inline

Definition at line 64 of file cached-unordered-map.h.

◆ contains()

template<typename _Key , typename _Value , typename _Hash = v8::base::hash<_Key>>
bool heap::base::CachedUnorderedMap< _Key, _Value, _Hash >::contains ( const Key & key) const
inline

Definition at line 62 of file cached-unordered-map.h.

◆ empty()

template<typename _Key , typename _Value , typename _Hash = v8::base::hash<_Key>>
bool heap::base::CachedUnorderedMap< _Key, _Value, _Hash >::empty ( ) const
inline

Definition at line 70 of file cached-unordered-map.h.

◆ end() [1/2]

template<typename _Key , typename _Value , typename _Hash = v8::base::hash<_Key>>
MapT::iterator heap::base::CachedUnorderedMap< _Key, _Value, _Hash >::end ( )
inline

Definition at line 58 of file cached-unordered-map.h.

◆ end() [2/2]

template<typename _Key , typename _Value , typename _Hash = v8::base::hash<_Key>>
MapT::const_iterator heap::base::CachedUnorderedMap< _Key, _Value, _Hash >::end ( ) const
inline

Definition at line 60 of file cached-unordered-map.h.

◆ erase()

template<typename _Key , typename _Value , typename _Hash = v8::base::hash<_Key>>
MapT::size_type heap::base::CachedUnorderedMap< _Key, _Value, _Hash >::erase ( const Key & key)
inline

Definition at line 45 of file cached-unordered-map.h.

◆ find()

template<typename _Key , typename _Value , typename _Hash = v8::base::hash<_Key>>
MapT::iterator heap::base::CachedUnorderedMap< _Key, _Value, _Hash >::find ( const Key & key)
inline

Definition at line 55 of file cached-unordered-map.h.

◆ operator[]()

template<typename _Key , typename _Value , typename _Hash = v8::base::hash<_Key>>
Mapped & heap::base::CachedUnorderedMap< _Key, _Value, _Hash >::operator[] ( const Key & key)
inline

Definition at line 24 of file cached-unordered-map.h.

◆ Take()

template<typename _Key , typename _Value , typename _Hash = v8::base::hash<_Key>>
MapT heap::base::CachedUnorderedMap< _Key, _Value, _Hash >::Take ( )
inline

Definition at line 72 of file cached-unordered-map.h.

Member Data Documentation

◆ last_key_

template<typename _Key , typename _Value , typename _Hash = v8::base::hash<_Key>>
Key heap::base::CachedUnorderedMap< _Key, _Value, _Hash >::last_key_ = nullptr
private

Definition at line 82 of file cached-unordered-map.h.

◆ last_mapped_

template<typename _Key , typename _Value , typename _Hash = v8::base::hash<_Key>>
Mapped* heap::base::CachedUnorderedMap< _Key, _Value, _Hash >::last_mapped_ = nullptr
private

Definition at line 83 of file cached-unordered-map.h.

◆ map_

template<typename _Key , typename _Value , typename _Hash = v8::base::hash<_Key>>
MapT heap::base::CachedUnorderedMap< _Key, _Value, _Hash >::map_
private

Definition at line 84 of file cached-unordered-map.h.


The documentation for this class was generated from the following file: