Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

WvGdbmHash< K, D > Class Template Reference

#include <wvgdbmhash.h>

Inherits WvGdbmHashBase.

Collaboration diagram for WvGdbmHash< K, D >:

[legend]
List of all members.

Detailed Description

template<class K, class D>
class WvGdbmHash< K, D >

This hashtable is different from normal WvStreams hashtables in that it stores the data on disk.

This affects memory management for objects stored in it.

For find and operator[], the returned object is only guaranteed to be around until the next find/or next() for iterators.

Definition at line 64 of file wvgdbmhash.h.

Public Member Functions

 WvGdbmHash (WvStringParm dbfile)
void add (const K &key, const D &data, bool replace=false)
void remove (const K &key)
D & find (const K &key)
D & operator[] (const K &key)
bool exists (const K &key)
int add (const datum &key, const datum &data, bool replace)
int remove (const datum &key)
datum find (const datum &key)
bool exists (const datum &key)
void zap ()

Static Public Member Functions

template<typename T> T undatumize (datum &data)

Protected Attributes

D * saveddata


Constructor & Destructor Documentation

template<class K, class D>
WvGdbmHash< K, D >::WvGdbmHash WvStringParm  dbfile  )  [inline]
 

Definition at line 96 of file wvgdbmhash.h.


Member Function Documentation

int WvGdbmHashBase::add const datum &  key,
const datum &  data,
bool  replace
[inherited]
 

Definition at line 29 of file wvgdbmhash.cc.

Referenced by WvGdbmHash< Index, WvBuf >::add().

template<class K, class D>
void WvGdbmHash< K, D >::add const K &  key,
const D &  data,
bool  replace = false
[inline]
 

Definition at line 99 of file wvgdbmhash.h.

Referenced by WvGdbmList< T >::save().

bool WvGdbmHashBase::exists const datum &  key  )  [inherited]
 

Definition at line 48 of file wvgdbmhash.cc.

Referenced by WvGdbmHash< Index, WvBuf >::exists().

template<class K, class D>
bool WvGdbmHash< K, D >::exists const K &  key  )  [inline]
 

Definition at line 122 of file wvgdbmhash.h.

Referenced by WvGdbmAlloc::alloc(), WvGdbmList< T >::init(), and WvGdbmList< T >::zap().

datum WvGdbmHashBase::find const datum &  key  )  [inherited]
 

Definition at line 42 of file wvgdbmhash.cc.

Referenced by WvGdbmHash< Index, WvBuf >::find().

template<class K, class D>
D& WvGdbmHash< K, D >::find const K &  key  )  [inline]
 

Definition at line 109 of file wvgdbmhash.h.

Referenced by WvGdbmHash< Index, WvBuf >::operator[]().

template<class K, class D>
D& WvGdbmHash< K, D >::operator[] const K &  key  )  [inline]
 

Definition at line 119 of file wvgdbmhash.h.

int WvGdbmHashBase::remove const datum &  key  )  [inherited]
 

Definition at line 36 of file wvgdbmhash.cc.

Referenced by WvGdbmHash< Index, WvBuf >::remove().

template<class K, class D>
void WvGdbmHash< K, D >::remove const K &  key  )  [inline]
 

Definition at line 106 of file wvgdbmhash.h.

template<class K, class D>
template<typename T>
T WvGdbmHash< K, D >::undatumize datum &  data  )  [inline, static]
 

Definition at line 86 of file wvgdbmhash.h.

void WvGdbmHashBase::zap  )  [inherited]
 

Definition at line 54 of file wvgdbmhash.cc.

Referenced by WvGdbmAlloc::zap().


Member Data Documentation

template<class K, class D>
D* WvGdbmHash< K, D >::saveddata [protected]
 

Definition at line 93 of file wvgdbmhash.h.


The documentation for this class was generated from the following file:
Generated on Sat Mar 13 14:57:51 2004 for WvStreams by doxygen 1.3.6-20040222