TaPAS  0.2
ccl-protos.h
Go to the documentation of this file.
1 /*
2  * ccl-protos.h Frequently used prototypes of generic functions
3  *
4  * This file is a part of the C Common Library (CCL) project.
5  *
6  * Copyright (C) 2010 CNRS UMR 5800 & Université Bordeaux I (see AUTHORS file).
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the AltaRica Public License that comes with this
10  * package.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15  */
16 
21 #ifndef __CCL_PROTOS_H__
22 # define __CCL_PROTOS_H__
23 
24 # include <ccl/ccl-common.h>
25 
26 BEGIN_C_DECLS
27 
32 typedef unsigned int ccl_hash_func (const void *ptr);
33 
38 # define CCL_DEFAULT_HASH_FUNC ((ccl_hash_func *) NULL)
39 
44 typedef void ccl_delete_proc (void *ptr);
45 
50 # define CCL_NO_DELETE_PROC ((ccl_delete_proc *) NULL)
51 
57 typedef int ccl_equals_func (const void *ptr1, const void *ptr2);
58 
63 # define CCL_DEFAULT_EQUALS_FUNC ((ccl_equals_func *) NULL)
64 
73 typedef int ccl_compare_func (const void *ptr1, const void *ptr2);
74 
75 #define CCL_DEFAULT_COMPARE_WITH_DATA_FUNC NULL
76 
77 typedef int ccl_compare_with_data_func (const void *o1, const void *o2,
78  void *data);
79 
84 # define CCL_DEFAULT_COMPARE_FUNC ((ccl_compare_func *) NULL)
85 
89 typedef void *ccl_duplicate_func (void *ptr);
90 
95 # define CCL_DEFAULT_DUPLICATE_FUNC ((ccl_duplicate_func *) NULL)
96 
97 typedef char *ccl_to_string_func (const void *label);
98 
99 typedef void ccl_map_proc (void *obj, void *data);
100 
101 END_C_DECLS
102 
103 #endif /* ! __CCL_PROTOS_H__ */
int ccl_equals_func(const void *ptr1, const void *ptr2)
Prototype of functions used to check the equality of two objects pointed respectively by ptr1 and ptr...
Definition: ccl-protos.h:57
int ccl_compare_func(const void *ptr1, const void *ptr2)
Prototype of functions used to order two objects pointed respectively by ptr1 and ptr2...
Definition: ccl-protos.h:73
void ccl_delete_proc(void *ptr)
Prototype of procedures used to release the resources allocated to the object pointed by ptr...
Definition: ccl-protos.h:44
Some useful and common macros.
void * ccl_duplicate_func(void *ptr)
Prototype of functions used to duplicate an object pointed by ptr.
Definition: ccl-protos.h:89
unsigned int ccl_hash_func(const void *ptr)
Prototype of functions used to compute a hashed value from an abstract object pointed by ptr...
Definition: ccl-protos.h:32