vdr 2.6.1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
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
 
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)
 
 cHashBase (int Size, bool OwnObjects)
 

Private Member Functions

unsigned int hashfn (unsigned int Id) const
 
unsigned int hashfn (unsigned int Id) const
 

Private Attributes

cList< cHashObject > ** hashTable
 
int size
 
bool ownObjects
 

Detailed Description

Definition at line 903 of file include/vdr/tools.h.

Constructor & Destructor Documentation

◆ cHashBase() [1/2]

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

References hashTable, ownObjects, and size.

◆ ~cHashBase() [1/2]

cHashBase::~cHashBase ( void  )
virtual

Definition at line 2377 of file tools.c.

References Clear(), and hashTable.

◆ cHashBase() [2/2]

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()).

◆ ~cHashBase() [2/2]

virtual cHashBase::~cHashBase ( )
virtual

Member Function Documentation

◆ Add() [1/2]

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

Definition at line 2383 of file tools.c.

References cListBase::Add(), hashfn(), and hashTable.

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

◆ Add() [2/2]

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

◆ Clear() [1/2]

void cHashBase::Clear ( void  )

◆ Clear() [2/2]

void cHashBase::Clear ( void  )

◆ Del() [1/2]

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

◆ Del() [2/2]

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

◆ Get() [1/2]

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

Definition at line 2419 of file tools.c.

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

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

◆ Get() [2/2]

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

◆ GetList() [1/2]

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

Definition at line 2431 of file tools.c.

References hashfn(), and hashTable.

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

◆ GetList() [2/2]

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

◆ hashfn() [1/2]

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

Definition at line 908 of file include/vdr/tools.h.

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

◆ hashfn() [2/2]

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

Definition at line 908 of file tools.h.

Member Data Documentation

◆ hashTable

cList< cHashObject > ** cHashBase::hashTable
private

Definition at line 905 of file include/vdr/tools.h.

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

◆ ownObjects

bool cHashBase::ownObjects
private

Definition at line 907 of file include/vdr/tools.h.

Referenced by cHashBase(), and Clear().

◆ size

int cHashBase::size
private

Definition at line 906 of file include/vdr/tools.h.

Referenced by cHashBase(), and Clear().


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