Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | List of all members
dart::IntMap< V > Class Template Reference

#include <hash_map.h>

Inheritance diagram for dart::IntMap< V >:
dart::DirectChainedHashMap< IntKeyRawPointerValueTrait< V > > dart::BaseDirectChainedHashMap< IntKeyRawPointerValueTrait< V >, ValueObject > dart::ValueObject

Public Types

typedef IntKeyRawPointerValueTrait< V >::Key Key
 
typedef IntKeyRawPointerValueTrait< V >::Value Value
 
typedef IntKeyRawPointerValueTrait< V >::Pair Pair
 

Public Member Functions

 IntMap ()
 
 IntMap (Zone *zone)
 
void Insert (const Key &key, const Value &value)
 
V Lookup (const Key &key) const
 
PairLookupPair (const Key &key) const
 
- Public Member Functions inherited from dart::DirectChainedHashMap< IntKeyRawPointerValueTrait< V > >
 DirectChainedHashMap ()
 
 DirectChainedHashMap (Zone *zone, intptr_t initial_size=DirectChainedHashMap::kInitialSize)
 
 DirectChainedHashMap (const DirectChainedHashMap &other)
 
- Public Member Functions inherited from dart::BaseDirectChainedHashMap< IntKeyRawPointerValueTrait< V >, ValueObject >
 BaseDirectChainedHashMap (Zone *allocator, intptr_t initial_size=kInitialSize)
 
 BaseDirectChainedHashMap (const BaseDirectChainedHashMap &other)
 
intptr_t Length () const
 
 ~BaseDirectChainedHashMap ()
 
void Insert (typename KeyValueTrait::Pair kv)
 
bool Remove (typename KeyValueTrait::Key key)
 
void Update (typename KeyValueTrait::Pair kv)
 
KeyValueTrait::Value LookupValue (typename KeyValueTrait::Key key) const
 
KeyValueTrait::Pair * Lookup (typename KeyValueTrait::Key key) const
 
bool HasKey (typename KeyValueTrait::Key key) const
 
intptr_t Size () const
 
bool IsEmpty () const
 
void Clear ()
 
Iterator GetIterator () const
 
- Public Member Functions inherited from dart::ValueObject
 ValueObject ()
 
 ~ValueObject ()
 

Additional Inherited Members

- Protected Member Functions inherited from dart::BaseDirectChainedHashMap< IntKeyRawPointerValueTrait< V >, ValueObject >
void Resize (intptr_t new_size)
 
- Protected Attributes inherited from dart::BaseDirectChainedHashMap< IntKeyRawPointerValueTrait< V >, ValueObject >
Zone *const allocator_
 
uint32_t * hash_table_
 
KeyValueTrait::Pair * pairs_
 
uint32_t hash_table_size_
 
uint32_t pairs_size_
 
uint32_t next_pair_index_
 
uint32_t deleted_count_
 
- Static Protected Attributes inherited from dart::BaseDirectChainedHashMap< IntKeyRawPointerValueTrait< V >, ValueObject >
static constexpr intptr_t kInitialSize
 
static constexpr uint32_t kEmpty
 
static constexpr uint32_t kDeleted
 
static constexpr uint32_t kMaxPairs
 

Detailed Description

template<typename V>
class dart::IntMap< V >

Definition at line 533 of file hash_map.h.

Member Typedef Documentation

◆ Key

template<typename V >
typedef IntKeyRawPointerValueTrait<V>::Key dart::IntMap< V >::Key

Definition at line 539 of file hash_map.h.

◆ Pair

template<typename V >
typedef IntKeyRawPointerValueTrait<V>::Pair dart::IntMap< V >::Pair

Definition at line 541 of file hash_map.h.

◆ Value

template<typename V >
typedef IntKeyRawPointerValueTrait<V>::Value dart::IntMap< V >::Value

Definition at line 540 of file hash_map.h.

Constructor & Destructor Documentation

◆ IntMap() [1/2]

template<typename V >
dart::IntMap< V >::IntMap ( )
inline

Definition at line 535 of file hash_map.h.

535: DirectChainedHashMap<IntKeyRawPointerValueTrait<V>>() {}

◆ IntMap() [2/2]

template<typename V >
dart::IntMap< V >::IntMap ( Zone zone)
inlineexplicit

Definition at line 536 of file hash_map.h.

537 : DirectChainedHashMap<IntKeyRawPointerValueTrait<V>>(zone) {}

Member Function Documentation

◆ Insert()

template<typename V >
void dart::IntMap< V >::Insert ( const Key key,
const Value value 
)
inline

Definition at line 543 of file hash_map.h.

543 {
544 Pair pair(key, value);
545 DirectChainedHashMap<IntKeyRawPointerValueTrait<V>>::Insert(pair);
546 }
void Insert(const Key &key, const Value &value)
Definition: hash_map.h:543
uint8_t value

◆ Lookup()

template<typename V >
V dart::IntMap< V >::Lookup ( const Key key) const
inline

Definition at line 548 of file hash_map.h.

548 {
549 Pair* pair =
550 DirectChainedHashMap<IntKeyRawPointerValueTrait<V>>::Lookup(key);
551 if (pair == nullptr) {
552 return V();
553 } else {
554 return pair->value;
555 }
556 }
V Lookup(const Key &key) const
Definition: hash_map.h:548
#define V(name)
Definition: raw_object.h:125

◆ LookupPair()

template<typename V >
Pair * dart::IntMap< V >::LookupPair ( const Key key) const
inline

Definition at line 558 of file hash_map.h.

558 {
559 return DirectChainedHashMap<IntKeyRawPointerValueTrait<V>>::Lookup(key);
560 }

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