• Home
  • Raw
  • Download

Lines Matching full:set

27 #include "hb-set.hh"
31 * SECTION:hb-set
32 * @title: hb-set
33 * @short_description: Objects representing a set of integers
36 * Set objects represent a mathematical set of integer values. They are
45 * Creates a new, initially empty set.
54 hb_set_t *set; in hb_set_create() local
56 if (!(set = hb_object_create<hb_set_t> ())) in hb_set_create()
59 return set; in hb_set_create()
79 * @set: A set
81 * Increases the reference count on a set.
83 * Return value: (transfer full): The set
88 hb_set_reference (hb_set_t *set) in hb_set_reference() argument
90 return hb_object_reference (set); in hb_set_reference()
95 * @set: A set
97 * Decreases the reference count on a set. When
98 * the reference count reaches zero, the set is
104 hb_set_destroy (hb_set_t *set) in hb_set_destroy() argument
106 if (!hb_object_destroy (set)) return; in hb_set_destroy()
108 hb_free (set); in hb_set_destroy()
113 * @set: A set
114 * @key: The user-data key to set
115 * @data: A pointer to the user data to set
119 * Attaches a user-data key/data pair to the specified set.
126 hb_set_set_user_data (hb_set_t *set, in hb_set_set_user_data() argument
132 return hb_object_set_user_data (set, key, data, destroy, replace); in hb_set_set_user_data()
137 * @set: A set
141 * attached to the specified set.
148 hb_set_get_user_data (const hb_set_t *set, in hb_set_get_user_data() argument
151 return hb_object_get_user_data (set, key); in hb_set_get_user_data()
157 * @set: A set
159 * Tests whether memory allocation for a set was successful.
166 hb_set_allocation_successful (const hb_set_t *set) in hb_set_allocation_successful() argument
168 return !set->in_error (); in hb_set_allocation_successful()
173 * @set: A set
175 * Allocate a copy of @set.
177 * Return value: Newly-allocated set.
182 hb_set_copy (const hb_set_t *set) in hb_set_copy() argument
186 copy->set (*set); in hb_set_copy()
192 * @set: A set
194 * Clears out the contents of a set.
199 hb_set_clear (hb_set_t *set) in hb_set_clear() argument
202 set->clear (); in hb_set_clear()
207 * @set: a set.
209 * Tests whether a set is empty (contains no elements).
211 * Return value: `true` if @set is empty
216 hb_set_is_empty (const hb_set_t *set) in hb_set_is_empty() argument
218 return set->is_empty (); in hb_set_is_empty()
223 * @set: A set
226 * Tests whether @codepoint belongs to @set.
228 * Return value: `true` if @codepoint is in @set, `false` otherwise
233 hb_set_has (const hb_set_t *set, in hb_set_has() argument
236 return set->has (codepoint); in hb_set_has()
241 * @set: A set
242 * @codepoint: The element to add to @set
244 * Adds @codepoint to @set.
249 hb_set_add (hb_set_t *set, in hb_set_add() argument
253 set->add (codepoint); in hb_set_add()
258 * @set: A set
262 * Adds @num_codepoints codepoints to a set at once.
269 hb_set_add_sorted_array (hb_set_t *set, in hb_set_add_sorted_array() argument
274 set->add_sorted_array (sorted_codepoints, in hb_set_add_sorted_array()
281 * @set: A set
282 * @first: The first element to add to @set
283 * @last: The final element to add to @set
286 * (inclusive) to @set.
291 hb_set_add_range (hb_set_t *set, in hb_set_add_range() argument
296 set->add_range (first, last); in hb_set_add_range()
301 * @set: A set
302 * @codepoint: Removes @codepoint from @set
304 * Removes @codepoint from @set.
309 hb_set_del (hb_set_t *set, in hb_set_del() argument
313 set->del (codepoint); in hb_set_del()
318 * @set: A set
319 * @first: The first element to remove from @set
320 * @last: The final element to remove from @set
323 * (inclusive) from @set.
331 hb_set_del_range (hb_set_t *set, in hb_set_del_range() argument
336 set->del_range (first, last); in hb_set_del_range()
341 * @set: A set
342 * @other: Another set
344 * Tests whether @set and @other are equal (contain the same
352 hb_set_is_equal (const hb_set_t *set, in hb_set_is_equal() argument
355 return set->is_equal (*other); in hb_set_is_equal()
360 * @set: A set
362 * Creates a hash representing @set.
365 * A hash of @set.
370 hb_set_hash (const hb_set_t *set) in hb_set_hash() argument
372 return set->hash (); in hb_set_hash()
377 * @set: A set
378 * @larger_set: Another set
380 * Tests whether @set is a subset of @larger_set.
382 * Return value: `true` if the @set is a subset of (or equal to) @larger_set, `false` otherwise.
387 hb_set_is_subset (const hb_set_t *set, in hb_set_is_subset() argument
390 return set->is_subset (*larger_set); in hb_set_is_subset()
395 * @set: A set
396 * @other: Another set
398 * Makes the contents of @set equal to the contents of @other.
403 hb_set_set (hb_set_t *set, in hb_set_set() argument
407 set->set (*other); in hb_set_set()
412 * @set: A set
413 * @other: Another set
415 * Makes @set the union of @set and @other.
420 hb_set_union (hb_set_t *set, in hb_set_union() argument
424 set->union_ (*other); in hb_set_union()
429 * @set: A set
430 * @other: Another set
432 * Makes @set the intersection of @set and @other.
437 hb_set_intersect (hb_set_t *set, in hb_set_intersect() argument
441 set->intersect (*other); in hb_set_intersect()
446 * @set: A set
447 * @other: Another set
449 * Subtracts the contents of @other from @set.
454 hb_set_subtract (hb_set_t *set, in hb_set_subtract() argument
458 set->subtract (*other); in hb_set_subtract()
463 * @set: A set
464 * @other: Another set
466 * Makes @set the symmetric difference of @set
472 hb_set_symmetric_difference (hb_set_t *set, in hb_set_symmetric_difference() argument
476 set->symmetric_difference (*other); in hb_set_symmetric_difference()
481 * @set: A set
483 * Inverts the contents of @set.
488 hb_set_invert (hb_set_t *set) in hb_set_invert() argument
491 set->invert (); in hb_set_invert()
496 * @set: A set
498 * Returns the number of elements in the set.
500 * Return value: The population of @set
505 hb_set_get_population (const hb_set_t *set) in hb_set_get_population() argument
507 return set->get_population (); in hb_set_get_population()
512 * @set: A set
514 * Finds the smallest element in the set.
516 * Return value: minimum of @set, or #HB_SET_VALUE_INVALID if @set is empty.
521 hb_set_get_min (const hb_set_t *set) in hb_set_get_min() argument
523 return set->get_min (); in hb_set_get_min()
528 * @set: A set
530 * Finds the largest element in the set.
532 * Return value: maximum of @set, or #HB_SET_VALUE_INVALID if @set is empty.
537 hb_set_get_max (const hb_set_t *set) in hb_set_get_max() argument
539 return set->get_max (); in hb_set_get_max()
544 * @set: A set
548 * Fetches the next element in @set that is greater than current value of @codepoint.
550 * Set @codepoint to #HB_SET_VALUE_INVALID to get started.
557 hb_set_next (const hb_set_t *set, in hb_set_next() argument
560 return set->next (codepoint); in hb_set_next()
565 * @set: A set
569 * Fetches the previous element in @set that is lower than current value of @codepoint.
571 * Set @codepoint to #HB_SET_VALUE_INVALID to get started.
578 hb_set_previous (const hb_set_t *set, in hb_set_previous() argument
581 return set->previous (codepoint); in hb_set_previous()
586 * @set: A set
591 * Fetches the next consecutive range of elements in @set that
594 * Set @last to #HB_SET_VALUE_INVALID to get started.
601 hb_set_next_range (const hb_set_t *set, in hb_set_next_range() argument
605 return set->next_range (first, last); in hb_set_next_range()
610 * @set: A set
615 * Fetches the previous consecutive range of elements in @set that
618 * Set @first to #HB_SET_VALUE_INVALID to get started.
625 hb_set_previous_range (const hb_set_t *set, in hb_set_previous_range() argument
629 return set->previous_range (first, last); in hb_set_previous_range()
634 * @set: A set
640 * Finds the next element in @set that is greater than @codepoint. Writes out
641 * codepoints to @out, until either the set runs out of elements, or @size
649 hb_set_next_many (const hb_set_t *set, in hb_set_next_many() argument
654 return set->next_many (codepoint, out, size); in hb_set_next_many()