GRPC C++
1.26.0
|
#include <slice_hash_table.h>
Data Structures | |
struct | Entry |
Public Types | |
typedef int(* | ValueCmp) (const T &, const T &) |
Public Member Functions | |
SliceHashTable (size_t num_entries, Entry *entries, ValueCmp value_cmp) | |
virtual | ~SliceHashTable () |
const T * | Get (const grpc_slice &key) const |
Returns the value from the table associated with key. More... | |
![]() | |
~RefCounted ()=default | |
RefCountedPtr< SliceHashTable< T > > | Ref () GRPC_MUST_USE_RESULT |
RefCountedPtr< SliceHashTable< T > > | Ref (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT |
void | Unref () |
void | Unref (const DebugLocation &location, const char *reason) |
bool | RefIfNonZero () |
bool | RefIfNonZero (const DebugLocation &location, const char *reason) |
RefCounted (const RefCounted &)=delete | |
RefCounted & | operator= (const RefCounted &)=delete |
![]() | |
virtual | ~PolymorphicRefCount ()=default |
Static Public Member Functions | |
static RefCountedPtr< SliceHashTable > | Create (size_t num_entries, Entry *entries, ValueCmp value_cmp) |
Creates a new hash table containing entries, which is an array of length num_entries. More... | |
static int | Cmp (const SliceHashTable &a, const SliceHashTable &b) |
Compares a vs. More... | |
Additional Inherited Members | |
![]() | |
RefCounted (TraceFlagT *trace_flag=nullptr, intptr_t initial_refcount=1) | |
typedef int(* grpc_core::SliceHashTable< T >::ValueCmp) (const T &, const T &) |
grpc_core::SliceHashTable< T >::SliceHashTable | ( | size_t | num_entries, |
Entry * | entries, | ||
ValueCmp | value_cmp | ||
) |
|
virtual |
|
static |
Compares a vs.
b. A table is considered "smaller" (resp. "greater") if:
|
static |
Creates a new hash table containing entries, which is an array of length num_entries.
Takes ownership of all keys and values in entries. If not null, value_cmp will be used to compare values in the context of Cmp(). If null, raw pointer (GPR_ICMP) comparison will be used.
const T * grpc_core::SliceHashTable< T >::Get | ( | const grpc_slice & | key | ) | const |
Returns the value from the table associated with key.
Returns null if key is not found.