2 * Copyright © 2018 Google, Inc.
4 * This is part of HarfBuzz, a text shaping library.
6 * Permission is hereby granted, without written agreement and without
7 * license or royalty fees, to use, copy, modify, and distribute this
8 * software and its documentation for any purpose, provided that the
9 * above copyright notice and the following two paragraphs appear in
10 * all copies of this software.
12 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
13 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
14 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
15 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
18 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
19 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
21 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
22 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
24 * Google Author(s): Behdad Esfahbod
27 #include "hb-map-private.hh"
34 * hb_map_create: (Xconstructor)
36 * Return value: (transfer full):
45 if (!(map = hb_object_create<hb_map_t> ()))
46 return hb_map_get_empty ();
56 * Return value: (transfer full):
61 hb_map_get_empty (void)
63 return const_cast<hb_map_t *> (&Null(hb_map_t));
67 * hb_map_reference: (skip)
70 * Return value: (transfer full):
75 hb_map_reference (hb_map_t *map)
77 return hb_object_reference (map);
81 * hb_map_destroy: (skip)
87 hb_map_destroy (hb_map_t *map)
89 if (!hb_object_destroy (map)) return;
97 * hb_map_set_user_data: (skip)
109 hb_map_set_user_data (hb_map_t *map,
110 hb_user_data_key_t *key,
112 hb_destroy_func_t destroy,
115 return hb_object_set_user_data (map, key, data, destroy, replace);
119 * hb_map_get_user_data: (skip)
123 * Return value: (transfer none):
128 hb_map_get_user_data (hb_map_t *map,
129 hb_user_data_key_t *key)
131 return hb_object_get_user_data (map, key);
136 * hb_map_allocation_successful:
146 hb_map_allocation_successful (const hb_map_t *map)
148 return map->successful;
165 hb_map_set (hb_map_t *map,
167 hb_codepoint_t value)
169 map->set (key, value);
182 hb_map_get (const hb_map_t *map,
185 return map->get (key);
198 hb_map_del (hb_map_t *map,
214 hb_map_has (const hb_map_t *map,
217 return map->has (key);
230 hb_map_clear (hb_map_t *map)
232 return map->clear ();
244 hb_map_is_empty (const hb_map_t *map)
246 return map->is_empty ();
250 * hb_map_get_population:
258 hb_map_get_population (const hb_map_t *map)
260 return map->get_population ();