template <size_t KeySize = 256, size_t ValueSize = 256, size_t NumEntries = 64>
class TSimpleStringDictionary
Defined at line 43 of file ../../third_party/crashpad/src/client/simple_string_dictionary.h
A map/dictionary collection implementation using a fixed amount of
storage, so that it does not perform any dynamic allocations for its
operations.
The actual map storage (TSimpleStringDictionary::Entry) is guaranteed to be
POD, so that it can be transmitted over various IPC mechanisms.
The template parameters control the amount of storage used for the key,
value, and map. The
and
are measured in bytes, not
glyphs, and include space for a trailing `NUL` byte. This gives space for
`KeySize - 1` and `ValueSize - 1` characters in an entry.
is
the total number of entries that will fit in the map.
Public Members
static const size_t key_size
static const size_t value_size
static const size_t num_entries
Public Methods
void TSimpleStringDictionary<KeySize, ValueSize, NumEntries> ()
Defined at line 104 of file ../../third_party/crashpad/src/client/simple_string_dictionary.h
void TSimpleStringDictionary<KeySize, ValueSize, NumEntries> (const TSimpleStringDictionary<KeySize, ValueSize, NumEntries> & other)
Defined at line 108 of file ../../third_party/crashpad/src/client/simple_string_dictionary.h
TSimpleStringDictionary<KeySize, ValueSize, NumEntries> & operator= (const TSimpleStringDictionary<KeySize, ValueSize, NumEntries> & other)
Defined at line 112 of file ../../third_party/crashpad/src/client/simple_string_dictionary.h
size_t GetCount ()
Returns the number of active key/value pairs. The upper limit for
this is
Defined at line 119 of file ../../third_party/crashpad/src/client/simple_string_dictionary.h
const char * GetValueForKey (std::string_view key)
Given
returns its corresponding value.
Parameters
Returns
The corresponding value for
or if
is not found,
`nullptr`.
Defined at line 136 of file ../../third_party/crashpad/src/client/simple_string_dictionary.h
void SetKeyValue (std::string_view key, std::string_view value)
Stores
into
replacing the existing value if
is already present.
If
is not yet in the map and the map is already full (containing
active entries), this operation silently fails.
Parameters
Defined at line 162 of file ../../third_party/crashpad/src/client/simple_string_dictionary.h
void RemoveKey (std::string_view key)
Removes
from the map.
If
is not found, this is a no-op.
Parameters
Defined at line 222 of file ../../third_party/crashpad/src/client/simple_string_dictionary.h