projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove the questionable and unused functions find_value() and r_find_value().
[libfirm]
/
include
/
libfirm
/
adt
/
cpset.h
diff --git
a/include/libfirm/adt/cpset.h
b/include/libfirm/adt/cpset.h
index
9d4bdc4
..
b13fea0
100644
(file)
--- a/
include/libfirm/adt/cpset.h
+++ b/
include/libfirm/adt/cpset.h
@@
-22,13
+22,19
@@
* @date 16.03.2007
* @brief a set of pointers with a custom compare function
* @author Matthias Braun
* @date 16.03.2007
* @brief a set of pointers with a custom compare function
* @author Matthias Braun
- * @version $Id$
*/
#ifndef FIRM_ADT_CPSET_H
#define FIRM_ADT_CPSET_H
#include "../begin.h"
*/
#ifndef FIRM_ADT_CPSET_H
#define FIRM_ADT_CPSET_H
#include "../begin.h"
+/**
+ * @ingroup adt
+ * @defgroup Pointer Set (custom Compare)
+ * A pointer set with user-definable compare function
+ * @{
+ */
+
/**
* The type of a cpset compare function.
*
/**
* The type of a cpset compare function.
*
@@
-44,6
+50,8
@@
typedef int (*cpset_cmp_function) (const void *p1, const void *p2);
*/
typedef unsigned (*cpset_hash_function) (const void *obj);
*/
typedef unsigned (*cpset_hash_function) (const void *obj);
+/** @cond PRIVATE */
+
#define HashSet cpset_t
#define HashSetIterator cpset_iterator_t
#define HashSetEntry cpset_hashset_entry_t
#define HashSet cpset_t
#define HashSetIterator cpset_iterator_t
#define HashSetEntry cpset_hashset_entry_t
@@
-56,7
+64,12
@@
typedef unsigned (*cpset_hash_function) (const void *obj);
#undef HashSetIterator
#undef HashSet
#undef HashSetIterator
#undef HashSet
+/** @endcond */
+
+/** a pointer set with custom compare function */
typedef struct cpset_t cpset_t;
typedef struct cpset_t cpset_t;
+/** iterator over a pointer set with custom compare function
+ * @see #cpset_t */
typedef struct cpset_iterator_t cpset_iterator_t;
/**
typedef struct cpset_iterator_t cpset_iterator_t;
/**
@@
-66,7
+79,7
@@
typedef struct cpset_iterator_t cpset_iterator_t;
* @param hash_function The hash function to use
* @param cmp_function The compare function to use
*/
* @param hash_function The hash function to use
* @param cmp_function The compare function to use
*/
-void cpset_init(cpset_t *cpset, cpset_hash_function hash_function,
+
FIRM_API
void cpset_init(cpset_t *cpset, cpset_hash_function hash_function,
cpset_cmp_function cmp_function);
/**
cpset_cmp_function cmp_function);
/**
@@
-77,7
+90,7
@@
void cpset_init(cpset_t *cpset, cpset_hash_function hash_function,
* @param cmp_function The compare function to use
* @param expected_elements Number of elements expected in the cpset (roughly)
*/
* @param cmp_function The compare function to use
* @param expected_elements Number of elements expected in the cpset (roughly)
*/
-void cpset_init_size(cpset_t *cpset, cpset_hash_function hash_function,
+
FIRM_API
void cpset_init_size(cpset_t *cpset, cpset_hash_function hash_function,
cpset_cmp_function cmp_function,
size_t expected_elements);
cpset_cmp_function cmp_function,
size_t expected_elements);
@@
-87,7
+100,7
@@
void cpset_init_size(cpset_t *cpset, cpset_hash_function hash_function,
*
* @param cpset Pointer to the cpset
*/
*
* @param cpset Pointer to the cpset
*/
-void cpset_destroy(cpset_t *cpset);
+
FIRM_API
void cpset_destroy(cpset_t *cpset);
/**
* Inserts an element into a cpset.
/**
* Inserts an element into a cpset.
@@
-96,7
+109,7
@@
void cpset_destroy(cpset_t *cpset);
* @param obj Element to insert into the cpset
* @returns The element itself or a pointer to an existing element
*/
* @param obj Element to insert into the cpset
* @returns The element itself or a pointer to an existing element
*/
-void* cpset_insert(cpset_t *cpset, void *obj);
+
FIRM_API
void* cpset_insert(cpset_t *cpset, void *obj);
/**
* Removes an element from a cpset. Does nothing if the cpset doesn't contain the
/**
* Removes an element from a cpset. Does nothing if the cpset doesn't contain the
@@
-105,7
+118,7
@@
void* cpset_insert(cpset_t *cpset, void *obj);
* @param cpset Pointer to the cpset
* @param obj Pointer to remove from the cpset
*/
* @param cpset Pointer to the cpset
* @param obj Pointer to remove from the cpset
*/
-void cpset_remove(cpset_t *cpset, const void *obj);
+
FIRM_API
void cpset_remove(cpset_t *cpset, const void *obj);
/**
* Tests whether a cpset contains a pointer
/**
* Tests whether a cpset contains a pointer
@@
-114,7
+127,7
@@
void cpset_remove(cpset_t *cpset, const void *obj);
* @param obj The pointer to find
* @returns An equivalent object to @p obj or NULL
*/
* @param obj The pointer to find
* @returns An equivalent object to @p obj or NULL
*/
-void *cpset_find(const cpset_t *cpset, const void *obj);
+
FIRM_API
void *cpset_find(const cpset_t *cpset, const void *obj);
/**
* Returns the number of pointers contained in the cpset
/**
* Returns the number of pointers contained in the cpset
@@
-122,7
+135,7
@@
void *cpset_find(const cpset_t *cpset, const void *obj);
* @param cpset Pointer to the cpset
* @returns Number of pointers contained in the cpset
*/
* @param cpset Pointer to the cpset
* @returns Number of pointers contained in the cpset
*/
-size_t cpset_size(const cpset_t *cpset);
+
FIRM_API
size_t cpset_size(const cpset_t *cpset);
/**
* Initializes a cpset iterator. Sets the iterator before the first element in
/**
* Initializes a cpset iterator. Sets the iterator before the first element in
@@
-131,7
+144,7
@@
size_t cpset_size(const cpset_t *cpset);
* @param iterator Pointer to already allocated iterator memory
* @param cpset Pointer to the cpset
*/
* @param iterator Pointer to already allocated iterator memory
* @param cpset Pointer to the cpset
*/
-void cpset_iterator_init(cpset_iterator_t *iterator, const cpset_t *cpset);
+
FIRM_API
void cpset_iterator_init(cpset_iterator_t *iterator, const cpset_t *cpset);
/**
* Advances the iterator and returns the current element or NULL if all elements
/**
* Advances the iterator and returns the current element or NULL if all elements
@@
-142,7
+155,7
@@
void cpset_iterator_init(cpset_iterator_t *iterator, const cpset_t *cpset);
* @param iterator Pointer to the cpset iterator.
* @returns Next element in the cpset or NULL
*/
* @param iterator Pointer to the cpset iterator.
* @returns Next element in the cpset or NULL
*/
-void *cpset_iterator_next(cpset_iterator_t *iterator);
+
FIRM_API
void *cpset_iterator_next(cpset_iterator_t *iterator);
/**
* Removed the element the iterator currently points to
/**
* Removed the element the iterator currently points to
@@
-150,7
+163,9
@@
void *cpset_iterator_next(cpset_iterator_t *iterator);
* @param cpset Pointer to the cpset
* @param iterator Pointer to the cpset iterator.
*/
* @param cpset Pointer to the cpset
* @param iterator Pointer to the cpset iterator.
*/
-void cpset_remove_iterator(cpset_t *cpset, const cpset_iterator_t *iterator);
+FIRM_API void cpset_remove_iterator(cpset_t *cpset, const cpset_iterator_t *iterator);
+
+/** @} */
#include "../end.h"
#include "../end.h"