#include <wvondisklist.h>
FIXME: I have no idea if this is fast, slow, stupid, or ingenious. I suspect it's probably quite inefficient - doing it entirely without the hash 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 WvOnDiskHash. This would probably be pretty useful.
Public Types | |
enum | { HEAD = 0, TAIL = -1000 } |
Public Member Functions | |
Index | retrieve (Index i) |
void | save (Index i, Index next, const T *data) |
WvOnDiskList (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 | |
WvOnDiskList::Link | saved |
Friends | |
class | WvOnDiskList::Iter |
Classes | |
class | Iter |
struct | Link |