vdr 2.6.3
|
#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) |
cListObject * | Get (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 |
|
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 2374 of file tools.c.
References hashTable, ownObjects, and size.
|
virtual |
void cHashBase::Add | ( | cListObject * | Object, |
unsigned int | Id | ||
) |
Definition at line 2387 of file tools.c.
References cListBase::Add(), hashfn(), and hashTable.
Referenced by cEIT::cEIT(), cChannels::HashChannel(), and cSchedule::HashEvent().
void cHashBase::Clear | ( | void | ) |
Definition at line 2408 of file tools.c.
References cList< T >::First(), hashTable, cList< T >::Next(), ownObjects, and size.
Referenced by cChannels::ReNumber(), cEitFilter::SetStatus(), and ~cHashBase().
void cHashBase::Del | ( | cListObject * | Object, |
unsigned int | Id | ||
) |
Definition at line 2395 of file tools.c.
References cListBase::Del(), cList< T >::First(), hashfn(), hashTable, and cList< T >::Next().
Referenced by cSchedule::HashEvent(), cChannels::UnhashChannel(), and cSchedule::UnhashEvent().
cListObject * cHashBase::Get | ( | unsigned int | Id | ) | const |
Definition at line 2423 of file tools.c.
References cList< T >::First(), hashfn(), hashTable, and cList< T >::Next().
Referenced by cHash< T >::Get().
cList< cHashObject > * cHashBase::GetList | ( | unsigned int | Id | ) | const |
Definition at line 2435 of file tools.c.
References hashfn(), and hashTable.
Referenced by cChannels::GetByChannelID(), and cChannels::GetByServiceID().
|
inlineprivate |
|
private |
Definition at line 905 of file tools.h.
Referenced by Add(), cHashBase(), Clear(), Del(), Get(), GetList(), and ~cHashBase().
|
private |
Definition at line 907 of file tools.h.
Referenced by cHashBase(), and Clear().
|
private |
Definition at line 906 of file tools.h.
Referenced by cHashBase(), and Clear().