ReactOS 0.4.16-dev-2546-g56481e1
tif_hash_set.h
Go to the documentation of this file.
1/**********************************************************************
2 * $Id$
3 *
4 * Name: tif_hash_set.h
5 * Project: TIFF - Common Portability Library
6 * Purpose: Hash set functions.
7 * Author: Even Rouault, <even dot rouault at spatialys.com>
8 *
9 **********************************************************************
10 * Copyright (c) 2008-2009, Even Rouault <even dot rouault at spatialys.com>
11 *
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
18 *
19 * The above copyright notice and this permission notice shall be included
20 * in all copies or substantial portions of the Software.
21 *
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28 * DEALINGS IN THE SOFTWARE.
29 ****************************************************************************/
30
31#ifndef TIFF_HASH_SET_H_INCLUDED
32#define TIFF_HASH_SET_H_INCLUDED
33
34#include <stdbool.h>
35
47#ifdef __cplusplus
48extern "C"
49{
50#endif
51
52 /* Types */
53
55 typedef struct _TIFFHashSet TIFFHashSet;
56
58 typedef unsigned long (*TIFFHashSetHashFunc)(const void *elt);
59
61 typedef bool (*TIFFHashSetEqualFunc)(const void *elt1, const void *elt2);
62
64 typedef void (*TIFFHashSetFreeEltFunc)(void *elt);
65
66 /* Functions */
67
71
73
75
76#ifdef notused
77 void TIFFHashSetClear(TIFFHashSet *set);
78
80 typedef int (*TIFFHashSetIterEltFunc)(void *elt, void *user_data);
81
82 void TIFFHashSetForeach(TIFFHashSet *set, TIFFHashSetIterEltFunc fnIterFunc,
83 void *user_data);
84#endif
85
86 bool TIFFHashSetInsert(TIFFHashSet *set, void *elt);
87
88 void *TIFFHashSetLookup(TIFFHashSet *set, const void *elt);
89
90 bool TIFFHashSetRemove(TIFFHashSet *set, const void *elt);
91
92#ifdef notused
93 bool TIFFHashSetRemoveDeferRehash(TIFFHashSet *set, const void *elt);
94#endif
95
96#ifdef __cplusplus
97}
98#endif
99
100#endif /* TIFF_HASH_SET_H_INCLUDED */
Definition: _set.h:50
static void * user_data
Definition: metahost.c:106
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
#define bool
Definition: nsiface.idl:72
#define long
Definition: qsort.c:33
TIFFHashSetEqualFunc fnEqualFunc
Definition: tif_hash_set.c:58
TIFFHashSetFreeEltFunc fnFreeEltFunc
Definition: tif_hash_set.c:59
TIFFHashSetHashFunc fnHashFunc
Definition: tif_hash_set.c:57
bool(* TIFFHashSetEqualFunc)(const void *elt1, const void *elt2)
Definition: tif_hash_set.h:61
void * TIFFHashSetLookup(TIFFHashSet *set, const void *elt)
Definition: tif_hash_set.c:502
bool TIFFHashSetInsert(TIFFHashSet *set, void *elt)
Definition: tif_hash_set.c:440
bool TIFFHashSetRemove(TIFFHashSet *set, const void *elt)
Definition: tif_hash_set.c:577
int TIFFHashSetSize(const TIFFHashSet *set)
Definition: tif_hash_set.c:180
TIFFHashSet * TIFFHashSetNew(TIFFHashSetHashFunc fnHashFunc, TIFFHashSetEqualFunc fnEqualFunc, TIFFHashSetFreeEltFunc fnFreeEltFunc)
Definition: tif_hash_set.c:138
void(* TIFFHashSetFreeEltFunc)(void *elt)
Definition: tif_hash_set.h:64
void TIFFHashSetDestroy(TIFFHashSet *set)
Definition: tif_hash_set.c:285
unsigned long(* TIFFHashSetHashFunc)(const void *elt)
Definition: tif_hash_set.h:58