reactor-c
1.0
C Runtime for Lingua Franca
Toggle main menu visibility
Loading...
Searching...
No Matches
hashset.h
Go to the documentation of this file.
1
49
50
#ifndef HASHSET_H
51
#define HASHSET_H 1
52
53
#include <stdlib.h>
54
55
#ifdef __cplusplus
56
extern
"C"
{
57
#endif
58
63
struct
hashset_st
{
64
size_t
nbits
;
65
size_t
mask
;
66
67
size_t
capacity
;
68
void
**
items
;
69
size_t
nitems
;
70
size_t
n_deleted_items
;
71
};
72
73
typedef
struct
hashset_st
*
hashset_t
;
74
84
hashset_t
hashset_create
(
unsigned
short
nbits
);
85
92
void
hashset_destroy
(
hashset_t
set);
93
101
size_t
hashset_num_items
(
hashset_t
set);
102
116
int
hashset_add
(
hashset_t
set,
void
* item);
117
126
int
hashset_remove
(
hashset_t
set,
void
* item);
127
136
int
hashset_is_member
(
hashset_t
set,
void
* item);
137
138
#ifdef __cplusplus
139
}
140
#endif
141
142
#endif
hashset_create
hashset_t hashset_create(unsigned short nbits)
Create a hashset instance.
hashset_add
int hashset_add(hashset_t set, void *item)
Add a pointer to the hashset.
hashset_is_member
int hashset_is_member(hashset_t set, void *item)
Returns non-zero if the item is in the hashset and zero otherwise.
hashset_remove
int hashset_remove(hashset_t set, void *item)
Remove an item from the hashset.
hashset_destroy
void hashset_destroy(hashset_t set)
Destroy the hashset instance, freeing allocated memory.
hashset_num_items
size_t hashset_num_items(hashset_t set)
Return the number of items in the hashset.
hashset_t
struct hashset_st * hashset_t
Definition
hashset.h:73
hashset_st
A hashset.
Definition
hashset.h:63
hashset_st::items
void ** items
Definition
hashset.h:68
hashset_st::capacity
size_t capacity
Definition
hashset.h:67
hashset_st::n_deleted_items
size_t n_deleted_items
Definition
hashset.h:70
hashset_st::nitems
size_t nitems
Definition
hashset.h:69
hashset_st::mask
size_t mask
Definition
hashset.h:65
hashset_st::nbits
size_t nbits
Definition
hashset.h:64
Users
runner
work
reactor-c
reactor-c
include
core
utils
hashset
hashset.h
Generated on
for reactor-c by
1.17.0