|
template<typename K , typename V , typename H > |
void | gt_ggc_mx (hash_map< K, V, H > *h) |
|
template<typename K , typename V , typename H > |
void | gt_pch_nx (hash_map< K, V, H > *h) |
|
template<typename K , typename V , typename H > |
void | gt_cleare_cache (hash_map< K, V, H > *h) |
|
template<typename K , typename V , typename H > |
void | gt_pch_nx (hash_map< K, V, H > *h, gt_pointer_operator op, void *cookie) |
|
template<bool ggc, typename K , typename V , typename H > |
hash_map< K, V, H > * | hash_map_maybe_create (hash_map< K, V, H > *&h, size_t size=default_hash_map_size) |
|
template<typename K , typename V , typename H > |
V * | hash_map_safe_get (hash_map< K, V, H > *h, const K &k) |
|
template<bool ggc, typename K , typename V , typename H > |
V & | hash_map_safe_get_or_insert (hash_map< K, V, H > *&h, const K &k, bool *e=NULL, size_t size=default_hash_map_size) |
|
template<bool ggc, typename K , typename V , typename H > |
bool | hash_map_safe_put (hash_map< K, V, H > *&h, const K &k, const V &v, size_t size=default_hash_map_size) |
|
const size_t default_hash_map_size = 13 |
A type-safe hash map.
Copyright (C) 2014-2024 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>.
Class hash_map is a hash-value based container mapping objects of
KeyId type to those of the Value type.
Both KeyId and Value may be non-trivial (non-POD) types provided
a suitabe Traits class. A few default Traits specializations are
provided for basic types such as integers, pointers, and std::pair.
Inserted elements are value-initialized either to zero for POD types
or by invoking their default ctor. Removed elements are destroyed
by invoking their dtor. On hash_map destruction all elements are
removed. Objects of hash_map type are copy-constructible but not
assignable.