vdr 2.7.7
cHashBase Class Reference

#include <tools.h>

Public Member Functions

virtual ~cHashBase ()
void Add (cListObject *Object, unsigned int Id)
void Del (cListObject *Object, unsigned int Id)
void Clear (void)
cListObjectGet (unsigned int Id) const
cList< cHashObject > * GetList (unsigned int Id) const

Protected Member Functions

 cHashBase (int Size, bool OwnObjects)

Private Member Functions

unsigned int hashfn (unsigned int Id) const

Private Attributes

cList< cHashObject > ** hashTable
int size
bool ownObjects

Detailed Description

Definition at line 893 of file tools.h.

Constructor & Destructor Documentation

◆ cHashBase()

cHashBase::cHashBase ( int Size,
bool OwnObjects )
protected

Creates a new hash of the given Size.

If OwnObjects is true, the hash takes ownership of the objects given in the calls to Add(), and deletes them when Clear() is called or the hash is destroyed (unless the object has been removed from the hash by calling Del()).

Definition at line 2363 of file tools.c.

References hashTable, ownObjects, and size.

Referenced by cHash< T >::cHash().

◆ ~cHashBase()

cHashBase::~cHashBase ( void )
virtual

Definition at line 2370 of file tools.c.

References Clear(), and hashTable.

Member Function Documentation

◆ Add()

void cHashBase::Add ( cListObject * Object,
unsigned int Id )

Definition at line 2376 of file tools.c.

References hashfn(), and hashTable.

Referenced by cEIT::cEIT().

◆ Clear()

void cHashBase::Clear ( void )

Definition at line 2397 of file tools.c.

References cList< T >::First(), hashTable, cList< T >::Next(), ownObjects, and size.

Referenced by ~cHashBase().

◆ Del()

void cHashBase::Del ( cListObject * Object,
unsigned int Id )

Definition at line 2384 of file tools.c.

References cListBase::Del(), cList< T >::First(), hashfn(), hashTable, and cList< T >::Next().

◆ Get()

cListObject * cHashBase::Get ( unsigned int Id) const

Definition at line 2412 of file tools.c.

References cList< T >::First(), hashfn(), hashTable, and cList< T >::Next().

Referenced by cHash< T >::Get().

◆ GetList()

cList< cHashObject > * cHashBase::GetList ( unsigned int Id) const

Definition at line 2424 of file tools.c.

References hashfn(), and hashTable.

◆ hashfn()

unsigned int cHashBase::hashfn ( unsigned int Id) const
inlineprivate

Definition at line 898 of file tools.h.

References size.

Referenced by Add(), Del(), Get(), and GetList().

Member Data Documentation

◆ hashTable

cList<cHashObject>** cHashBase::hashTable
private

Definition at line 895 of file tools.h.

Referenced by Add(), cHashBase(), Clear(), Del(), Get(), GetList(), and ~cHashBase().

◆ ownObjects

bool cHashBase::ownObjects
private

Definition at line 897 of file tools.h.

Referenced by cHashBase(), and Clear().

◆ size

int cHashBase::size
private

Definition at line 896 of file tools.h.

Referenced by cHashBase(), Clear(), and hashfn().


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