Logo Search packages:      
Sourcecode: ocropus version File versions  Download package

colib::strhash< T > Class Template Reference

#include <hash.h>

List of all members.

Detailed Description

template<class T>
class colib::strhash< T >

A string-to-something hash class.

A simple string-to-something hash class. This is not particularly high performance, but it should be good enough for most uses.

Definition at line 253 of file hash.h.

Public Member Functions

void dealloc ()
 Make the hash table empty again and deallocate all the data it holds.
void grow_by (int n)
 Grow the hash table by the given amount.
T & operator() (const char *key)
 Return a reference to the location associated with the given key.
 strhash (int initial=3)
 Allocate a hash table with a given initial size.

Private Member Functions

void maybe_grow ()

Private Attributes

narray< kvp > data
int fill


struct  kvp

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index