kmail

#include <kmdict.h>

Public Member Functions

 KMDict (int size=17)
 
 ~KMDict ()
 
void clear ()
 
int size ()
 
void replace (long key, KMDictItem *item)
 
void insert (long key, KMDictItem *item)
 
void remove (long key)
 
KMDictItemfind (long key)
 

Friends

class MessageDictTester
 

Detailed Description

KMDict implements a lightweight dictionary with serial numbers as keys.

KMDict is a leightweight dictionary used exclusively by KMMsgDict. It uses serial numbers as keys.

Author
Ronen Tzur rtzur.nosp@m.@sha.nosp@m.ni.ne.nosp@m.t

Definition at line 26 of file kmdict.h.

Constructor & Destructor Documentation

◆ KMDict()

KMDict::KMDict ( int  size = 17)

Creates a hash table with size columns.

Definition at line 15 of file kmdict.cpp.

◆ ~KMDict()

KMDict::~KMDict ( )

Destroys the hash table object.

Definition at line 23 of file kmdict.cpp.

Member Function Documentation

◆ clear()

void KMDict::clear ( )

Clears the hash table, removing all items.

Definition at line 39 of file kmdict.cpp.

◆ find()

KMDictItem * KMDict::find ( long  key)

Find an item by key.

Returns pointer to it, or 0 if not found.

Definition at line 107 of file kmdict.cpp.

◆ insert()

void KMDict::insert ( long  key,
KMDictItem item 
)

Inserts an item without replacing ones with the same key.

Definition at line 66 of file kmdict.cpp.

◆ remove()

void KMDict::remove ( long  key)

Removes an item.

Definition at line 76 of file kmdict.cpp.

◆ replace()

void KMDict::replace ( long  key,
KMDictItem item 
)

Inserts an item, replacing old ones with the same key.

Definition at line 57 of file kmdict.cpp.

◆ size()

int KMDict::size ( )
inline

Returns the size of the hash table.

Definition at line 40 of file kmdict.h.


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