| Kyoto Cabinet
   
    | 
Memory-saving string hash map. More...
#include <kcmap.h>
| Classes | |
| class | Iterator | 
| Iterator of records.  More... | |
| struct | Record | 
| Record data. | |
| struct | RecordComparator | 
| Comparator for records. | |
| class | Sorter | 
| Sorter of records.  More... | |
| Public Member Functions | |
| TinyHashMap () | |
| Default constructor. | |
| TinyHashMap (size_t bnum) | |
| Constructor. | |
| ~TinyHashMap () | |
| Destructor. | |
| void | set (const char *kbuf, size_t ksiz, const char *vbuf, size_t vsiz) | 
| Set the value of a record. | |
| bool | add (const char *kbuf, size_t ksiz, const char *vbuf, size_t vsiz) | 
| Add a record. | |
| bool | replace (const char *kbuf, size_t ksiz, const char *vbuf, size_t vsiz) | 
| Replace the value of a record. | |
| void | append (const char *kbuf, size_t ksiz, const char *vbuf, size_t vsiz) | 
| Append the value of a record. | |
| bool | remove (const char *kbuf, size_t ksiz) | 
| Remove a record. | |
| const char * | get (const char *kbuf, size_t ksiz, size_t *sp) | 
| Retrieve the value of a record. | |
| void | clear () | 
| Remove all records. | |
| size_t | count () | 
| Get the number of records. | |
| Static Public Member Functions | |
| static size_t | hash_record (const char *kbuf, size_t ksiz) | 
| Get the hash value of a record. | |
Memory-saving string hash map.
| kyotocabinet::TinyHashMap::TinyHashMap | ( | ) |  [explicit] | 
Default constructor.
| kyotocabinet::TinyHashMap::TinyHashMap | ( | size_t | bnum | ) |  [explicit] | 
Constructor.
| bnum | the number of buckets of the hash table. | 
Destructor.
| void kyotocabinet::TinyHashMap::set | ( | const char * | kbuf, | 
| size_t | ksiz, | ||
| const char * | vbuf, | ||
| size_t | vsiz | ||
| ) | 
Set the value of a record.
| kbuf | the pointer to the key region. | 
| ksiz | the size of the key region. | 
| vbuf | the pointer to the value region. | 
| vsiz | the size of the value region. | 
| bool kyotocabinet::TinyHashMap::add | ( | const char * | kbuf, | 
| size_t | ksiz, | ||
| const char * | vbuf, | ||
| size_t | vsiz | ||
| ) | 
Add a record.
| kbuf | the pointer to the key region. | 
| ksiz | the size of the key region. | 
| vbuf | the pointer to the value region. | 
| vsiz | the size of the value region. | 
| bool kyotocabinet::TinyHashMap::replace | ( | const char * | kbuf, | 
| size_t | ksiz, | ||
| const char * | vbuf, | ||
| size_t | vsiz | ||
| ) | 
Replace the value of a record.
| kbuf | the pointer to the key region. | 
| ksiz | the size of the key region. | 
| vbuf | the pointer to the value region. | 
| vsiz | the size of the value region. | 
| void kyotocabinet::TinyHashMap::append | ( | const char * | kbuf, | 
| size_t | ksiz, | ||
| const char * | vbuf, | ||
| size_t | vsiz | ||
| ) | 
Append the value of a record.
| kbuf | the pointer to the key region. | 
| ksiz | the size of the key region. | 
| vbuf | the pointer to the value region. | 
| vsiz | the size of the value region. | 
| bool kyotocabinet::TinyHashMap::remove | ( | const char * | kbuf, | 
| size_t | ksiz | ||
| ) | 
Remove a record.
| kbuf | the pointer to the key region. | 
| ksiz | the size of the key region. | 
| const char* kyotocabinet::TinyHashMap::get | ( | const char * | kbuf, | 
| size_t | ksiz, | ||
| size_t * | sp | ||
| ) | 
Retrieve the value of a record.
| kbuf | the pointer to the key region. | 
| ksiz | the size of the key region. | 
| sp | the pointer to the variable into which the size of the region of the return value is assigned. | 
| void kyotocabinet::TinyHashMap::clear | ( | ) | 
Remove all records.
| size_t kyotocabinet::TinyHashMap::count | ( | ) | 
Get the number of records.
| static size_t kyotocabinet::TinyHashMap::hash_record | ( | const char * | kbuf, | 
| size_t | ksiz | ||
| ) |  [static] | 
Get the hash value of a record.
| kbuf | the pointer to the key region. | 
| ksiz | the size of the key region. | 
 1.7.6.1
 1.7.6.1