Public interface of class 'LRUCache'. More...
#include <LRUCache.h>
Related Functions | |
(Note that these are not member functions.) | |
| void | LRUCache_clear (LRUCache_ptr self) |
| Clears all entries in the cache. | |
| LRUCache_ptr | LRUCache_create (size_t threshold, LRU_CACHE_EQ_FUN key_eq_fun, LRU_CACHE_HASH_FUN key_hash_fun, LRU_CACHE_FREE_FUN free_entry_fun, void *custom_arg) |
| The LRUCache class constructor. | |
| void | LRUCache_destroy (LRUCache_ptr self) |
| The LRUCache class destructor. | |
| boolean | LRUCache_insert (LRUCache_ptr self, const void *key, const void *value) |
| Inserts an element in the LRUCache. | |
| void | LRUCache_iter_values (const LRUCache_ptr self, const LRUCacheIter iter, void **k, void **v) |
| Retrieves the key and value entries associated with the given iterator. | |
| void * | LRUCache_lookup (LRUCache_ptr self, const void *key) |
| Looks up for an element in the LRUCache. | |
| boolean | LRUCache_remove (LRUCache_ptr self, const void *key) |
| Removes the entry added with key "key" from the LRUCache. | |
Public interface of class 'LRUCache'.
Definition of the public accessor for class LRUCache
| void LRUCache_clear | ( | LRUCache_ptr | self | ) | [related] |
Clears all entries in the cache.
Clears all entries in the cache
| LRUCache_ptr LRUCache_create | ( | size_t | threshold, | |
| LRU_CACHE_EQ_FUN | key_eq_fun, | |||
| LRU_CACHE_HASH_FUN | key_hash_fun, | |||
| LRU_CACHE_FREE_FUN | free_entry_fun, | |||
| void * | custom_arg | |||
| ) | [related] |
The LRUCache class constructor.
AutomaticStart
The LRUCache class constructor.
OAHash class keys equality and hashing functions can be used, e.g. OAHash_pointer_eq_fun and OAHash_pointer_hash_fun, respectively.
| free_entry_fun | can be NULL | |
| custom_arg | can be NULL |
| void LRUCache_destroy | ( | LRUCache_ptr | self | ) | [related] |
| boolean LRUCache_insert | ( | LRUCache_ptr | self, | |
| const void * | key, | |||
| const void * | value | |||
| ) | [related] |
| void LRUCache_iter_values | ( | const LRUCache_ptr | self, | |
| const LRUCacheIter | iter, | |||
| void ** | k, | |||
| void ** | v | |||
| ) | [related] |
Retrieves the key and value entries associated with the given iterator.
Retrieves the key and value entries associated with the given iterator. Both key and value can be NULL
| void * LRUCache_lookup | ( | LRUCache_ptr | self, | |
| const void * | key | |||
| ) | [related] |
Looks up for an element in the LRUCache.
Looks up for an element in the LRUCache
| boolean LRUCache_remove | ( | LRUCache_ptr | self, | |
| const void * | key | |||
| ) | [related] |
1.6.1