WvStreams
Classes | Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
WvScatterHashBase Class Referenceabstract
Inheritance diagram for WvScatterHashBase:
Inheritance graph
[legend]

Classes

class  IterBase
 

Public Member Functions

 WvScatterHashBase (unsigned _numslots)
 
size_t count () const
 
bool isempty () const
 
size_t slowcount () const
 
 WvScatterHashBase (unsigned _numslots)
 
size_t count () const
 
bool isempty () const
 
size_t slowcount () const
 

Static Public Attributes

static const unsigned null_idx = (unsigned)-1
 
static const unsigned prime_numbers []
 

Protected Types

typedef void * Slot
 
typedef unsigned char Status
 
typedef void * Slot
 
typedef unsigned char Status
 

Protected Member Functions

virtual unsigned do_hash (const void *data)=0
 
virtual void do_delete (void *data)=0
 
unsigned genfind (const void *data, unsigned hash) const
 
Slot genfind_or_null (const void *data, unsigned hash) const
 
void _add (void *data, bool autofree)
 
void _add (void *data, unsigned hash, bool autofree)
 
void _remove (const void *data, unsigned hash)
 
void _zap ()
 
void _set_autofree (const void *data, unsigned hash, bool autofree)
 
bool _get_autofree (const void *data, unsigned hash)
 
virtual bool compare (const void *key, const void *elem) const =0
 
virtual unsigned do_hash (const void *data)=0
 
virtual void do_delete (void *data)=0
 
unsigned genfind (const void *data, unsigned hash) const
 
Slot genfind_or_null (const void *data, unsigned hash) const
 
void _add (void *data, bool autofree)
 
void _add (void *data, unsigned hash, bool autofree)
 
void _remove (const void *data, unsigned hash)
 
void _zap ()
 
void _set_autofree (const void *data, unsigned hash, bool autofree)
 
bool _get_autofree (const void *data, unsigned hash)
 
virtual bool compare (const void *key, const void *elem) const =0
 

Protected Attributes

Slot * xslots
 
Status * xstatus
 
int prime_index
 
unsigned numslots
 

Friends

class IterBase
 

Detailed Description

Definition at line 22 of file debian/libwvstreams-dev/usr/include/wvstreams/wvscatterhash.h.

Member Typedef Documentation

◆ Slot [1/2]

typedef void* WvScatterHashBase::Slot
protected

◆ Status [1/2]

typedef unsigned char WvScatterHashBase::Status
protected

◆ Slot [2/2]

typedef void* WvScatterHashBase::Slot
protected

Definition at line 86 of file include/wvscatterhash.h.

◆ Status [2/2]

typedef unsigned char WvScatterHashBase::Status
protected

Definition at line 87 of file include/wvscatterhash.h.

Constructor & Destructor Documentation

◆ WvScatterHashBase()

WvScatterHashBase::WvScatterHashBase ( unsigned  _numslots)

Definition at line 25 of file wvscatterhash.cc.

◆ ~WvScatterHashBase() [1/2]

virtual WvScatterHashBase::~WvScatterHashBase ( )
inlinevirtual

◆ ~WvScatterHashBase() [2/2]

virtual WvScatterHashBase::~WvScatterHashBase ( )
inlinevirtual

Definition at line 26 of file include/wvscatterhash.h.

Member Function Documentation

◆ count() [1/2]

size_t WvScatterHashBase::count ( ) const
inline

◆ isempty() [1/2]

bool WvScatterHashBase::isempty ( ) const
inline

◆ slowcount()

size_t WvScatterHashBase::slowcount ( ) const

Definition at line 46 of file wvscatterhash.cc.

◆ genfind()

unsigned WvScatterHashBase::genfind ( const void *  data,
unsigned  hash 
) const
protected

Definition at line 159 of file wvscatterhash.cc.

◆ genfind_or_null()

void * WvScatterHashBase::genfind_or_null ( const void *  data,
unsigned  hash 
) const
protected

Definition at line 181 of file wvscatterhash.cc.

◆ _add() [1/2]

void WvScatterHashBase::_add ( void *  data,
bool  autofree 
)
protected

Definition at line 86 of file wvscatterhash.cc.

◆ _add() [2/2]

void WvScatterHashBase::_add ( void *  data,
unsigned  hash,
bool  autofree 
)
protected

Definition at line 91 of file wvscatterhash.cc.

◆ _remove()

void WvScatterHashBase::_remove ( const void *  data,
unsigned  hash 
)
protected

Definition at line 113 of file wvscatterhash.cc.

◆ _zap()

void WvScatterHashBase::_zap ( )
protected

Definition at line 126 of file wvscatterhash.cc.

◆ _set_autofree()

void WvScatterHashBase::_set_autofree ( const void *  data,
unsigned  hash,
bool  autofree 
)
protected

Definition at line 139 of file wvscatterhash.cc.

◆ _get_autofree()

bool WvScatterHashBase::_get_autofree ( const void *  data,
unsigned  hash 
)
protected

Definition at line 148 of file wvscatterhash.cc.

◆ count() [2/2]

size_t WvScatterHashBase::count ( ) const
inline

Definition at line 31 of file include/wvscatterhash.h.

◆ isempty() [2/2]

bool WvScatterHashBase::isempty ( ) const
inline

Definition at line 32 of file include/wvscatterhash.h.

Friends And Related Symbol Documentation

◆ IterBase

IterBase
friend

Member Data Documentation

◆ null_idx

static const unsigned WvScatterHashBase::null_idx = (unsigned)-1
static

◆ prime_numbers

const unsigned WvScatterHashBase::prime_numbers
static
Initial value:
= {2u, 5u, 11u, 17u,
31u, 67u, 127u, 251u,
509u, 1021u, 2039u, 4093u,
8191u, 16381u, 32749u, 65521u,
131071u, 262139u, 524287u, 1048573u,
2097143u, 4194301u, 8388593u, 16777213u,
33554393u, 67108859u, 134217689u, 268435399u,
536870909u, 1073741789u, 2147483647u, 4294967281u}

Definition at line 12 of file debian/libwvstreams-dev/usr/include/wvstreams/wvscatterhash.h.

◆ xslots

Slot * WvScatterHashBase::xslots
protected

◆ xstatus

Status * WvScatterHashBase::xstatus
protected

◆ prime_index

int WvScatterHashBase::prime_index
protected

◆ numslots

unsigned WvScatterHashBase::numslots
protected

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