#include <wvgdbmlist.h>
Collaboration diagram for WvGdbmList< T >:
FIXME: I have no idea if this is fast, slow, stupid, or ingenious. I suspect it's probably quite inefficient - doing it entirely without gdbm and writing our own space allocator would probably make more sense.
FIXME: we should use a common non-templated base class rather than implementing everything inline.
FIXME: if HEAD and TAIL weren't hardcoded, we could put more than one list in the same WvGdbmHash. This would probably be pretty useful.
Definition at line 95 of file wvgdbmlist.h.
Public Types | |
enum | { HEAD = 0, TAIL = -1000 } |
Public Member Functions | |
Index | retrieve (Index i) |
void | save (Index i, Index next, const T *data) |
WvGdbmList (WvStringParm filename) | |
void | init () |
void | zap () |
size_t | count () |
bool | isempty () |
T * | first () |
T * | last () |
void | add_after (Index after, const T *data, bool auto_free=false, void *id=NULL) |
void | append (const T &data, bool auto_free=false, void *id=NULL) |
void | prepend (const T &data, bool auto_free=false, void *id=NULL) |
void | append (const T *data, bool auto_free=false, void *id=NULL) |
void | prepend (const T *data, bool auto_free=false, void *id=NULL) |
void | unlink_first () |
void | unlink_after (Index prev) |
Public Attributes | |
WvGdbmList::Link | saved |
|
Definition at line 105 of file wvgdbmlist.h. |
|
Definition at line 157 of file wvgdbmlist.h. References WvGdbmList< T >::init(), and WvStringParm. |
|
Definition at line 207 of file wvgdbmlist.h. References WvGdbmAlloc::alloc(), WvGdbmList< T >::Link::data(), WvGdbmList< T >::HEAD, WvGdbmList< T >::retrieve(), WvGdbmList< T >::save(), WvGdbmList< T >::saved, and WvGdbmList< T >::TAIL. Referenced by WvGdbmList< T >::append(), and WvGdbmList< T >::prepend(). |
|
Definition at line 227 of file wvgdbmlist.h. References WvGdbmList< T >::add_after(), WvGdbmList< T >::retrieve(), and WvGdbmList< T >::TAIL. |
|
Definition at line 222 of file wvgdbmlist.h. References WvGdbmList< T >::add_after(), WvGdbmList< T >::retrieve(), and WvGdbmList< T >::TAIL. |
|
Definition at line 179 of file wvgdbmlist.h. References WvGdbmList< T >::HEAD, and WvGdbmList< T >::retrieve(). |
|
Definition at line 192 of file wvgdbmlist.h. References WvGdbmList< T >::Link::data(), WvGdbmList< T >::HEAD, WvGdbmList< T >::retrieve(), and WvGdbmList< T >::saved. |
|
Definition at line 162 of file wvgdbmlist.h. References WvGdbmHash< K, D >::exists(), WvGdbmList< T >::HEAD, WvGdbmList< T >::TAIL, and WvGdbmList< T >::zap(). Referenced by WvGdbmList< T >::WvGdbmList(). |
|
Definition at line 187 of file wvgdbmlist.h. References WvGdbmList< T >::HEAD, and WvGdbmList< T >::retrieve(). |
|
Definition at line 199 of file wvgdbmlist.h. References WvGdbmList< T >::Link::data(), WvGdbmList< T >::retrieve(), WvGdbmList< T >::saved, and WvGdbmList< T >::TAIL. |
|
Definition at line 229 of file wvgdbmlist.h. References WvGdbmList< T >::add_after(), and WvGdbmList< T >::HEAD. |
|
Definition at line 224 of file wvgdbmlist.h. References WvGdbmList< T >::add_after(), and WvGdbmList< T >::HEAD. |
|
|
Definition at line 146 of file wvgdbmlist.h. References WvGdbmHash< K, D >::add(), wv_serialize(), and WvDynBuf. Referenced by WvGdbmList< T >::add_after(), WvGdbmList< T >::unlink_after(), and WvGdbmList< T >::zap(). |
|
Definition at line 241 of file wvgdbmlist.h. References WvGdbmList< T >::Link::data(), WvGdbmList< T >::HEAD, WvGdbmList< T >::retrieve(), WvGdbmList< T >::save(), WvGdbmList< T >::saved, WvGdbmList< T >::TAIL, and WvGdbmAlloc::unalloc(). Referenced by WvGdbmList< T >::Iter::unlink(), WvGdbmList< T >::unlink_first(), and WvGdbmList< T >::Iter::xunlink(). |
|
Definition at line 238 of file wvgdbmlist.h. References WvGdbmList< T >::HEAD, and WvGdbmList< T >::unlink_after(). |
|
Definition at line 171 of file wvgdbmlist.h. References WvGdbmHash< K, D >::exists(), WvGdbmList< T >::HEAD, WvGdbmList< T >::save(), WvGdbmList< T >::TAIL, and WvGdbmAlloc::zap(). Referenced by WvGdbmList< T >::init(). |
|
Referenced by WvGdbmList< T >::add_after(), WvGdbmList< T >::first(), WvGdbmList< T >::last(), WvGdbmList< T >::Iter::ptr(), WvGdbmList< T >::retrieve(), and WvGdbmList< T >::unlink_after(). |