Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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< KeyValueTrait, B, Allocator > B A

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< KeyValueTrait, B, Allocator >
 BaseDirectChainedHashMap (Allocator *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 B
 B ()
 
void setValues (int v) override
 
bool checkValues (int v) override
 
- Public Member Functions inherited from A
 A ()
 
virtual ~A ()
 
void * operator new (size_t size)
 
void operator delete (void *p)
 

Additional Inherited Members

- Static Public Member Functions inherited from A
static ACreate (SkRandom *r)
 
static void SetAllocator (size_t preallocSize, size_t minAllocSize)
 
static void ResetAllocator ()
 
static void ValidatePool ()
 
- Protected Member Functions inherited from dart::BaseDirectChainedHashMap< KeyValueTrait, B, Allocator >
void Resize (intptr_t new_size)
 
- Protected Attributes inherited from dart::BaseDirectChainedHashMap< KeyValueTrait, B, Allocator >
Allocator *const allocator_
 
uint32_t * hash_table_ = nullptr
 
KeyValueTrait::Pair * pairs_ = nullptr
 
uint32_t hash_table_size_ = 0
 
uint32_t pairs_size_ = 0
 
uint32_t next_pair_index_ = 0
 
uint32_t deleted_count_ = 0
 
- Static Protected Attributes inherited from dart::BaseDirectChainedHashMap< KeyValueTrait, B, Allocator >
static constexpr intptr_t kInitialSize = 16
 
static constexpr uint32_t kEmpty = kMaxUint32
 
static constexpr uint32_t kDeleted = kMaxUint32 - 1
 
static constexpr uint32_t kMaxPairs = kMaxUint32 - 2
 

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

◆ 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:124

◆ 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: