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

WvGdbmAlloc Class Reference

#include <wvgdbmlist.h>

Collaboration diagram for WvGdbmAlloc:

[legend]
List of all members.

Detailed Description

A class based on WvGdbmHash that lets you store WvBufs and auto-assign them Index values as keys.

This is convenient for implementing various data structures in the on-disk hash, since you can use Index values wherever an in-memory structure would use a pointer.

NOTE: Index values <= 0 have a special meaning, and will never be assigned automatically. WvGdbmAlloc uses Index # -1 itself as the beginning of the FREELIST. The others you can use as you wish.

Definition at line 22 of file wvgdbmlist.h.

Public Types

typedef int32_t Index
typedef WvGdbmHash< Index,
WvBuf
LinkHash
enum  { FREELIST = -1 }

Public Member Functions

 WvGdbmAlloc (WvStringParm filename)
void zap ()
Index alloc ()
void unalloc (Index i)

Public Attributes

LinkHash hash


Member Typedef Documentation

typedef int32_t WvGdbmAlloc::Index
 

Definition at line 27 of file wvgdbmlist.h.

Referenced by alloc().

typedef WvGdbmHash<Index, WvBuf> WvGdbmAlloc::LinkHash
 

Definition at line 28 of file wvgdbmlist.h.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
FREELIST 

Definition at line 25 of file wvgdbmlist.h.


Constructor & Destructor Documentation

WvGdbmAlloc::WvGdbmAlloc WvStringParm  filename  )  [inline]
 

Definition at line 32 of file wvgdbmlist.h.

References hash, and WvStringParm.


Member Function Documentation

Index WvGdbmAlloc::alloc  )  [inline]
 

Definition at line 58 of file wvgdbmlist.h.

References WvGdbmHash< K, D >::exists(), FREELIST, hash, and Index.

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

void WvGdbmAlloc::unalloc Index  i  )  [inline]
 

Definition at line 73 of file wvgdbmlist.h.

References FREELIST, and unalloc().

Referenced by unalloc(), and WvGdbmList< T >::unlink_after().

void WvGdbmAlloc::zap  )  [inline]
 

Definition at line 52 of file wvgdbmlist.h.

References FREELIST, hash, and WvGdbmHashBase::zap().

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


Member Data Documentation

LinkHash WvGdbmAlloc::hash
 

Definition at line 30 of file wvgdbmlist.h.

Referenced by alloc(), WvGdbmAlloc(), and zap().


The documentation for this class was generated from the following file:
Generated on Tue Oct 5 01:09:26 2004 for WvStreams by doxygen 1.3.7