offbrand
A collection of generic, reference counted datastructures in C for C
Main Page
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Macros
Groups
include
private
obmap_private.h
Go to the documentation of this file.
1
7
#ifndef OBMAP_PRIVATE_H
8
#define OBMAP_PRIVATE_H
9
10
#include "../obmap.h"
11
#include "../obvector.h"
12
#include "../obdeque.h"
13
14
/* obmap PRIVATE CONSTANTS */
15
20
extern
const
uint32_t
MAP_CAPACITIES
[];
24
extern
const
uint32_t
NUM_CAPACITIES
;
28
extern
const
double
MAX_LOAD_FACTOR
;
29
30
31
/* obmap_pair DATA */
32
37
typedef
struct
obmap_pair_struct
{
38
obj
base
;
39
obj
*
key
;
40
obj
*
value
;
41
}
obmap_pair
;
42
43
/* obmap_pair PRIVATE METHODS */
44
58
obmap_pair
*
obmap_new_pair
(
obj
*key,
obj
*value);
59
69
obmap_pair
*
obmap_copy_pair
(
obmap_pair
*mp);
70
77
void
obmap_replace_pair_value
(
obmap_pair
*mp,
obj
*value);
78
86
ob_hash_t
obmap_hash_pair
(
const
obj
*to_hash);
87
93
void
obmap_display_pair
(
const
obj
*to_print);
94
104
void
obmap_destroy_pair
(
obj
*to_dealloc);
105
106
107
/* obmap DATA */
108
113
struct
obmap_struct
{
114
obj
base
;
115
uint8_t
cap_idx
;
117
obvector
*
hash_table
;
118
obdeque
*
pairs
;
120
uint32_t
collisions
;
122
};
123
124
/* obmap PRIVATE METHODS */
125
134
obmap
*
obmap_create_default
(
void
);
135
143
ob_hash_t
obmap_hash
(
const
obj
*to_hash);
144
155
int8_t
obmap_compare
(
const
obj
*a,
const
obj
*b);
156
/* Arguments are obj * so that a function pointer can be used for container
157
* class sorting/search */
158
164
void
obmap_display
(
const
obj
*to_print);
165
175
void
obmap_destroy
(
obj
*to_dealloc);
176
183
void
obmap_increase_size
(
obmap
*to_size);
184
191
void
obmap_add_to_table
(
obmap
*m,
obdeque_iterator
*it);
192
202
ob_hash_t
obmap_find_key
(
const
obmap
*m,
const
obj
*key);
203
212
ob_hash_t
obmap_offset_collision
(
ob_hash_t
prev_offset);
213
214
#endif
215
Generated on Sun Jun 30 2013 15:56:45 for offbrand by
1.8.4