KVIrc  4.9.2
DeveloperAPIs
Classes | Functions
KviPointerHashTable.h File Reference

Pointer Hash Table. More...

#include "kvi_settings.h"
#include "KviPointerList.h"
#include "KviCString.h"
#include "KviQString.h"
#include "KviMemory.h"
#include "kvi_debug.h"
#include <ctype.h>

Go to the source code of this file.

Classes

class  KviPointerHashTable< Key, T >
 A fast pointer hash table implementation. More...
 
class  KviPointerHashTable< Key, T >
 A fast pointer hash table implementation. More...
 
class  KviPointerHashTableEntry< Key, T >
 
class  KviPointerHashTableIterator< Key, T >
 A fast pointer hash table iterator implementation. More...
 
class  KviPointerHashTableIterator< Key, T >
 A fast pointer hash table iterator implementation. More...
 

Functions

unsigned int kvi_hash_hash (const char *szKey, bool bCaseSensitive)
 Hash function for the char * data type. More...
 
unsigned int kvi_hash_hash (const KviCString &szKey, bool bCaseSensitive)
 Hash function for the KviCString data type. More...
 
unsigned int kvi_hash_hash (const int &iKey, bool)
 Hash function for the int data type. More...
 
unsigned int kvi_hash_hash (const unsigned short &iKey, bool)
 Hash function for the unsigned short data type. More...
 
unsigned int kvi_hash_hash (void *pKey, bool)
 Hash function for the void * data type. More...
 
unsigned int kvi_hash_hash (const QString &szKey, bool bCaseSensitive)
 Hash function for the QString data type. More...
 
void kvi_hash_key_copy (const char *const &szFrom, const char *&szTo, bool bDeepCopy)
 Hash key copy function for the char * data type. More...
 
void kvi_hash_key_copy (const KviCString &szFrom, KviCString &szTo, bool)
 Hash key copy function for the KviCString data type. More...
 
void kvi_hash_key_copy (const int &iKeyFrom, int &iKeyTo, bool)
 Hash key copy function for the int data type. More...
 
void kvi_hash_key_copy (const unsigned short &iKeyFrom, unsigned short &iKeyTo, bool)
 Hash key copy function for the unsigned short data type. More...
 
void kvi_hash_key_copy (void *const &pKeyFrom, void *&pKeyTo, bool)
 Hash key copy function for the void * data type. More...
 
void kvi_hash_key_copy (const QString &szFrom, QString &szTo, bool)
 Hash key copy function for the QString data type. More...
 
const char *& kvi_hash_key_default (const char **)
 Default (empty) hash key for the char * data type. More...
 
const KviCStringkvi_hash_key_default (KviCString *)
 Default (empty) hash key for the KviCString data type. More...
 
const int & kvi_hash_key_default (int *)
 Default (empty) hash key for the int data type. More...
 
const unsigned short & kvi_hash_key_default (unsigned short *)
 Default (empty) hash key for the unsigned short data type. More...
 
void *& kvi_hash_key_default (void *)
 Default (empty) hash key for the void * data type. More...
 
const QString & kvi_hash_key_default (QString *)
 Default (empty) hash key for the QString data type. More...
 
void kvi_hash_key_destroy (const char *&szKey, bool bDeepCopy)
 Hash key destruction function for the char * data type. More...
 
void kvi_hash_key_destroy (KviCString &, bool)
 Hash key destruction function for the KviCString data type. More...
 
void kvi_hash_key_destroy (int &, bool)
 Hash key destruction function for the int data type. More...
 
void kvi_hash_key_destroy (unsigned short &, bool)
 Hash key destruction function for the unsigned short data type. More...
 
void kvi_hash_key_destroy (void *, bool)
 Hash key destruction function for the void * data type. More...
 
void kvi_hash_key_destroy (QString &, bool)
 Hash key destruction function for the QString data type. More...
 
bool kvi_hash_key_equal (const char *szKey1, const char *szKey2, bool bCaseSensitive)
 Hash key compare function for the char * data type. More...
 
bool kvi_hash_key_equal (const KviCString &szKey1, const KviCString &szKey2)
 Hash key compare function for the KviCString data type. More...
 
bool kvi_hash_key_equal (const int &iKey1, const int &iKey2, bool)
 Hash key compare function for the int data type. More...
 
bool kvi_hash_key_equal (const unsigned short &iKey1, const unsigned short &iKey2, bool)
 Hash key compare function for the unsigned short data type. More...
 
bool kvi_hash_key_equal (void *pKey1, void *pKey2, bool)
 Hash key compare function for the void * data type. More...
 
bool kvi_hash_key_equal (const QString &szKey1, const QString &szKey2, bool bCaseSensitive)
 Hash key compare function for the QString data type. More...
 

Detailed Description

Pointer Hash Table.

Author
Szymon Stefanek

Function Documentation

unsigned int kvi_hash_hash ( const char *  szKey,
bool  bCaseSensitive 
)
inline
unsigned int kvi_hash_hash ( const KviCString szKey,
bool  bCaseSensitive 
)
inline

Hash function for the KviCString data type.

References p, and KviCString::ptr().

unsigned int kvi_hash_hash ( const int &  iKey,
bool   
)
inline

Hash function for the int data type.

unsigned int kvi_hash_hash ( const unsigned short &  iKey,
bool   
)
inline

Hash function for the unsigned short data type.

unsigned int kvi_hash_hash ( void *  pKey,
bool   
)
inline

Hash function for the void * data type.

unsigned int kvi_hash_hash ( const QString &  szKey,
bool  bCaseSensitive 
)
inline

Hash function for the QString data type.

References p.

void kvi_hash_key_copy ( const char *const &  szFrom,
const char *&  szTo,
bool  bDeepCopy 
)
inline

Hash key copy function for the char * data type.

References KviMemory::allocate(), KviMemory::copy(), and kvi_strLen.

Referenced by KviPointerHashTable< QString, KviActionCategory >::insert().

void kvi_hash_key_copy ( const KviCString szFrom,
KviCString szTo,
bool   
)
inline

Hash key copy function for the KviCString data type.

void kvi_hash_key_copy ( const int &  iKeyFrom,
int &  iKeyTo,
bool   
)
inline

Hash key copy function for the int data type.

void kvi_hash_key_copy ( const unsigned short &  iKeyFrom,
unsigned short &  iKeyTo,
bool   
)
inline

Hash key copy function for the unsigned short data type.

void kvi_hash_key_copy ( void *const &  pKeyFrom,
void *&  pKeyTo,
bool   
)
inline

Hash key copy function for the void * data type.

void kvi_hash_key_copy ( const QString &  szFrom,
QString &  szTo,
bool   
)
inline

Hash key copy function for the QString data type.

const char*& kvi_hash_key_default ( const char **  )
inline

Default (empty) hash key for the char * data type.

References NULL.

Referenced by KviPointerHashTable< QString, KviActionCategory >::currentKey(), and KviPointerHashTableIterator< Key, T >::currentKey().

const KviCString& kvi_hash_key_default ( KviCString )
inline

Default (empty) hash key for the KviCString data type.

References KviCString::emptyString().

const int& kvi_hash_key_default ( int *  )
inline

Default (empty) hash key for the int data type.

const unsigned short& kvi_hash_key_default ( unsigned short *  )
inline

Default (empty) hash key for the unsigned short data type.

void*& kvi_hash_key_default ( void *  )
inline

Default (empty) hash key for the void * data type.

References NULL.

const QString& kvi_hash_key_default ( QString *  )
inline

Default (empty) hash key for the QString data type.

References KviQString::Empty.

void kvi_hash_key_destroy ( const char *&  szKey,
bool  bDeepCopy 
)
inline
void kvi_hash_key_destroy ( KviCString ,
bool   
)
inline

Hash key destruction function for the KviCString data type.

void kvi_hash_key_destroy ( int &  ,
bool   
)
inline

Hash key destruction function for the int data type.

void kvi_hash_key_destroy ( unsigned short &  ,
bool   
)
inline

Hash key destruction function for the unsigned short data type.

void kvi_hash_key_destroy ( void *  ,
bool   
)
inline

Hash key destruction function for the void * data type.

void kvi_hash_key_destroy ( QString &  ,
bool   
)
inline

Hash key destruction function for the QString data type.

bool kvi_hash_key_equal ( const char *  szKey1,
const char *  szKey2,
bool  bCaseSensitive 
)
inline
bool kvi_hash_key_equal ( const KviCString szKey1,
const KviCString szKey2 
)
inline

Hash key compare function for the KviCString data type.

References kvi_hash_key_equal(), and KviCString::ptr().

bool kvi_hash_key_equal ( const int &  iKey1,
const int &  iKey2,
bool   
)
inline

Hash key compare function for the int data type.

bool kvi_hash_key_equal ( const unsigned short &  iKey1,
const unsigned short &  iKey2,
bool   
)
inline

Hash key compare function for the unsigned short data type.

bool kvi_hash_key_equal ( void *  pKey1,
void *  pKey2,
bool   
)
inline

Hash key compare function for the void * data type.

bool kvi_hash_key_equal ( const QString &  szKey1,
const QString &  szKey2,
bool  bCaseSensitive 
)
inline

Hash key compare function for the QString data type.

References KviQString::equalCI(), and KviQString::equalCS().