Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | List of all members
dart::CStringSetKeyValueTrait Class Reference

#include <hash_map.h>

Public Types

using Key = const char *
 
using Value = const char *
 
using Pair = const char *
 

Static Public Member Functions

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

Detailed Description

Definition at line 418 of file hash_map.h.

Member Typedef Documentation

◆ Key

Definition at line 420 of file hash_map.h.

◆ Pair

Definition at line 422 of file hash_map.h.

◆ Value

Definition at line 421 of file hash_map.h.

Member Function Documentation

◆ Hash()

static uword dart::CStringSetKeyValueTrait::Hash ( Key  key)
inlinestatic

Definition at line 426 of file hash_map.h.

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

◆ IsKeyEqual()

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

Definition at line 430 of file hash_map.h.

430 {
431 ASSERT(kv != nullptr && key != nullptr);
432 return kv == key || strcmp(kv, key) == 0;
433 }

◆ KeyOf()

static Key dart::CStringSetKeyValueTrait::KeyOf ( Pair  kv)
inlinestatic

Definition at line 424 of file hash_map.h.

424{ return kv; }

◆ ValueOf()

static Value dart::CStringSetKeyValueTrait::ValueOf ( Pair  kv)
inlinestatic

Definition at line 425 of file hash_map.h.

425{ return kv; }

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