hashlist.h File Reference

#include "common.h"
#include "config.h"
#include "collection.h"
#include "hashtable.h"

Go to the source code of this file.

Data Structures

struct  _cp_hashlist_entry
struct  _cp_hashlist
struct  _cp_hashlist_iterator
#define cp_hashlist_create(size_hint, hash_fn, compare_fn)
#define cp_hashlist_rdlock(list)   cp_hashlist_lock((list), COLLECTION_LOCK_READ)
#define cp_hashlist_wrlock(list)   cp_hashlist_lock((list), COLLECTION_LOCK_WRITE)
typedef CPROPS_DLL struct
_cp_hashlist 
cp_hashlist
typedef CPROPS_DLL struct
_cp_hashlist_iterator 
cp_hashlist_iterator
CPROPS_DLL void * cp_hashlist_remove_by_option (cp_hashlist *list, void *key, int mode)
CPROPS_DLL void * cp_hashlist_remove_head_by_option (cp_hashlist *list, int mode)
CPROPS_DLL void * cp_hashlist_remove_tail_by_option (cp_hashlist *list, int mode)
CPROPS_DLL cp_hashlistcp_hashlist_create_by_mode (int mode, unsigned long size_hint, cp_hashfunction hash_fn, cp_compare_fn compare_fn)
CPROPS_DLL cp_hashlistcp_hashlist_create_by_option (int mode, unsigned long size_hint, cp_hashfunction hash_fn, cp_compare_fn compare_fn, cp_copy_fn copy_key, cp_destructor_fn free_key, cp_copy_fn copy_value, cp_destructor_fn free_value)
CPROPS_DLL void cp_hashlist_destroy (cp_hashlist *)
CPROPS_DLL void cp_hashlist_destroy_deep (cp_hashlist *)
CPROPS_DLL void cp_hashlist_destroy_by_option (cp_hashlist *list, int mode)
CPROPS_DLL void cp_hashlist_destroy_custom (cp_hashlist *list, cp_destructor_fn dk, cp_destructor_fn dv)
CPROPS_DLL int cp_hashlist_callback (cp_hashlist *list, int(*cb)(void *key, void *value, void *id), void *id)
CPROPS_DLL int cp_hashlist_get_mode (cp_hashlist *list)
CPROPS_DLL int cp_hashlist_set_mode (cp_hashlist *list, int mode)
CPROPS_DLL int cp_hashlist_unset_mode (cp_hashlist *list, int mode)
CPROPS_DLL int cp_hashlist_set_min_size (cp_hashlist *list, unsigned long min_size)
CPROPS_DLL int cp_hashlist_set_max_fill_factor (cp_hashlist *list, int fill_factor)
CPROPS_DLL int cp_hashlist_set_min_fill_factor (cp_hashlist *list, int fill_factor)
CPROPS_DLL cp_hashlist_iteratorcp_hashlist_create_iterator (cp_hashlist *list, int lock_mode)
CPROPS_DLL int cp_hashlist_iterator_head (cp_hashlist_iterator *iterator)
CPROPS_DLL int cp_hashlist_iterator_init (cp_hashlist_iterator *iterator, cp_hashlist *list, int type)
CPROPS_DLL int cp_hashlist_iterator_init_tail (cp_hashlist_iterator *iterator, cp_hashlist *l, int lock_mode)
CPROPS_DLL int cp_hashlist_iterator_tail (cp_hashlist_iterator *iterator)
CPROPS_DLL int cp_hashlist_iterator_to_key (cp_hashlist_iterator *iterator, void *key)
CPROPS_DLL int cp_hashlist_iterator_destroy (cp_hashlist_iterator *iterator)
CPROPS_DLL int cp_hashlist_iterator_release (cp_hashlist_iterator *iterator)
CPROPS_DLL cp_hashlist_entry * cp_hashlist_iterator_next (cp_hashlist_iterator *iterator)
CPROPS_DLL void * cp_hashlist_iterator_next_key (cp_hashlist_iterator *iterator)
CPROPS_DLL void * cp_hashlist_iterator_next_value (cp_hashlist_iterator *iterator)
CPROPS_DLL cp_hashlist_entry * cp_hashlist_iterator_prev (cp_hashlist_iterator *iterator)
CPROPS_DLL void * cp_hashlist_iterator_prev_key (cp_hashlist_iterator *iterator)
CPROPS_DLL void * cp_hashlist_iterator_prev_value (cp_hashlist_iterator *iterator)
CPROPS_DLL cp_hashlist_entry * cp_hashlist_iterator_curr (cp_hashlist_iterator *iterator)
CPROPS_DLL void * cp_hashlist_iterator_curr_key (cp_hashlist_iterator *iterator)
CPROPS_DLL void * cp_hashlist_iterator_curr_value (cp_hashlist_iterator *iterator)
CPROPS_DLL cp_hashlist_entry * cp_hashlist_iterator_insert (cp_hashlist_iterator *iterator, void *key, void *value)
CPROPS_DLL cp_hashlist_entry * cp_hashlist_iterator_append (cp_hashlist_iterator *iterator, void *key, void *value)
CPROPS_DLL void * cp_hashlist_iterator_remove (cp_hashlist_iterator *iterator)
CPROPS_DLL unsigned long cp_hashlist_item_count (cp_hashlist *)
CPROPS_DLL void * cp_hashlist_entry_get_key (cp_hashlist_entry *entry)
CPROPS_DLL void * cp_hashlist_entry_get_value (cp_hashlist_entry *entry)
CPROPS_DLL void * cp_hashlist_insert (cp_hashlist *list, void *key, void *value)
CPROPS_DLL void * cp_hashlist_insert_by_option (cp_hashlist *list, void *key, void *item, int mode)
CPROPS_DLL void * cp_hashlist_append (cp_hashlist *list, void *key, void *value)
CPROPS_DLL void * cp_hashlist_append_by_option (cp_hashlist *, void *key, void *value, int mode)
CPROPS_DLL void * cp_hashlist_get (cp_hashlist *, void *key)
CPROPS_DLL int cp_hashlist_contains (cp_hashlist *list, void *key)
CPROPS_DLL void * cp_hashlist_get_head (cp_hashlist *)
CPROPS_DLL void * cp_hashlist_get_tail (cp_hashlist *)
CPROPS_DLL void * cp_hashlist_remove (cp_hashlist *list, void *key)
CPROPS_DLL void * cp_hashlist_remove_deep (cp_hashlist *list, void *key)
CPROPS_DLL void * cp_hashlist_remove_head (cp_hashlist *list)
CPROPS_DLL void * cp_hashlist_remove_tail (cp_hashlist *list)
CPROPS_DLL int cp_hashlist_is_empty (cp_hashlist *list)
CPROPS_DLL int cp_hashlist_lock (cp_hashlist *list, int type)
CPROPS_DLL int cp_hashlist_unlock (cp_hashlist *list)
__BEGIN_DECLS typedef CPROPS_DLL
struct _cp_hashlist_entry 
cp_hashlist_entry


Detailed Description

a mapping traversable by iterator - who could want more. access elements sequentially or by key.

Definition in file hashlist.h.


Define Documentation

#define cp_hashlist_create ( size_hint,
hash_fn,
compare_fn   ) 

Value:

cp_hashlist_create_by_option(0, (size_hint), \
                                     (hash_fn), (compare_fn), \
                                     NULL, NULL, NULL, NULL)
default constructor

Definition at line 116 of file hashlist.h.

Referenced by cp_http_thread_fn(), cp_httpclient_ctl_create(), and cp_thread_pool_create().

#define cp_hashlist_rdlock ( list   )     cp_hashlist_lock((list), COLLECTION_LOCK_READ)

Set a read lock on the object.

Definition at line 564 of file hashlist.h.

#define cp_hashlist_wrlock ( list   )     cp_hashlist_lock((list), COLLECTION_LOCK_WRITE)

Set a write lock on the object.

Definition at line 569 of file hashlist.h.


Typedef Documentation

typedef CPROPS_DLL struct _cp_hashlist cp_hashlist

Main object that holds the endpoints of the hash-list and the hash-table.

It also stores the hash, compare and copy methods and the default operation mode.

typedef CPROPS_DLL struct _cp_hashlist_iterator cp_hashlist_iterator

iterator for hashlists


Generated on Mon Dec 5 23:00:22 2011 for cprops by  doxygen 1.4.7