Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Public Types | Static Public Member Functions | Static Public Attributes | List of all members
dart::CStringIntMapKeyValueTrait Struct Reference

#include <hash_map.h>

Classes

struct  Pair
 

Public Types

using Key = const char *
 
using Value = intptr_t
 

Static Public Member Functions

static Key KeyOf (const Pair &pair)
 
static Value ValueOf (const Pair &pair)
 
static uword Hash (const Key &key)
 
static bool IsKeyEqual (const Pair &kv, const Key &key)
 

Static Public Attributes

static constexpr Value kNoValue = kIntptrMin
 

Detailed Description

Definition at line 459 of file hash_map.h.

Member Typedef Documentation

◆ Key

Definition at line 460 of file hash_map.h.

◆ Value

Definition at line 461 of file hash_map.h.

Member Function Documentation

◆ Hash()

static uword dart::CStringIntMapKeyValueTrait::Hash ( const Key key)
inlinestatic

Definition at line 476 of file hash_map.h.

476 {
477 ASSERT(key != nullptr);
478 return Utils::StringHash(key, strlen(key));
479 }
static uint32_t StringHash(const void *data, int length)
Definition utils.cc:114
#define ASSERT(E)

◆ IsKeyEqual()

static bool dart::CStringIntMapKeyValueTrait::IsKeyEqual ( const Pair kv,
const Key key 
)
inlinestatic

Definition at line 480 of file hash_map.h.

480 {
481 ASSERT(kv.key != nullptr && key != nullptr);
482 return kv.key == key || strcmp(kv.key, key) == 0;
483 }

◆ KeyOf()

static Key dart::CStringIntMapKeyValueTrait::KeyOf ( const Pair pair)
inlinestatic

Definition at line 474 of file hash_map.h.

474{ return pair.key; }

◆ ValueOf()

static Value dart::CStringIntMapKeyValueTrait::ValueOf ( const Pair pair)
inlinestatic

Definition at line 475 of file hash_map.h.

475{ return pair.value; }

Member Data Documentation

◆ kNoValue

constexpr Value dart::CStringIntMapKeyValueTrait::kNoValue = kIntptrMin
staticconstexpr

Definition at line 463 of file hash_map.h.


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