vdr  2.4.0
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
cHashBase Class Reference

#include <tools.h>

Collaboration diagram for cHashBase:
[legend]

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 856 of file tools.h.

Constructor & Destructor Documentation

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 2338 of file tools.c.

cHashBase::~cHashBase ( void  )
virtual

Definition at line 2345 of file tools.c.

References cListBase::Clear().

Member Function Documentation

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

Definition at line 2351 of file tools.c.

References cListBase::Add().

Referenced by cEIT::cEIT(), and cChannels::HashChannel().

void cHashBase::Clear ( void  )

Definition at line 2372 of file tools.c.

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

Referenced by cChannels::ReNumber().

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

Definition at line 2359 of file tools.c.

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

Referenced by cChannels::UnhashChannel().

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

Definition at line 2387 of file tools.c.

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

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

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

Definition at line 2399 of file tools.c.

Referenced by cChannels::GetByChannelID(), and cChannels::GetByServiceID().

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

Definition at line 861 of file tools.h.

Member Data Documentation

cList<cHashObject>** cHashBase::hashTable
private

Definition at line 858 of file tools.h.

bool cHashBase::ownObjects
private

Definition at line 860 of file tools.h.

int cHashBase::size
private

Definition at line 859 of file tools.h.


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