![]() |
KVIrc 5.2.4
Developer APIs
|
A fast pointer hash table implementation. More...
#include <KviPointerHashTable.h>
Public Member Functions | |
void | clear () |
Removes all the items from the hash table. | |
void | copyFrom (KviPointerHashTable< Key, T > &t) |
Removes all items in the hash table and then makes a complete shallow copy of the data contained in t. | |
unsigned int | count () const |
Returns the number of items in this hash table. | |
T * | current () |
Returns the data value pointer pointed by the hash table iterator. | |
KviPointerHashTableEntry< Key, T > * | currentEntry () |
Returns the entry pointed by the hash table iterator. | |
const Key & | currentKey () |
Returns the key pointed by the hash table iterator. | |
T * | find (const Key &hKey) |
Returns the item associated to the key. | |
KviPointerHashTableEntry< Key, T > * | findRef (const T *pRef) |
Searches for the item pointer pRef. | |
T * | first () |
Places the hash table iterator at the first entry. | |
KviPointerHashTableEntry< Key, T > * | firstEntry () |
Places the hash table iterator at the first entry and returns it. | |
void | insert (const Key &hKey, T *pData) |
Inserts the item pData at the position specified by the key hKey. | |
void | insert (KviPointerHashTable< Key, T > &t) |
Inserts a complete shallow copy of the data contained in t. | |
bool | isEmpty () const |
Returns true if the hash table is empty. | |
KviPointerHashTable (KviPointerHashTable< Key, T > &t) | |
First creates an empty hash table and then inserts a copy of all the item pointers present in t. | |
KviPointerHashTable (unsigned int uSize=32, bool bCaseSensitive=true, bool bDeepCopyKeys=true) | |
Creates an empty hash table. | |
T * | next () |
Places the hash table iterator at the next entry and returns the associated data value pointer. | |
KviPointerHashTableEntry< Key, T > * | nextEntry () |
Places the hash table iterator at the next entry and returns it. | |
T * | operator[] (const Key &hKey) |
Returns the item associated to the key hKey. | |
bool | remove (const Key &hKey) |
Removes the item pointer associated to the key hKey, if such an item exists in the hash table. | |
bool | removeRef (const T *pRef) |
Removes the first occurrence of the item pointer pRef. | |
void | replace (const Key &hKey, T *pData) |
Inserts the item pData at the position specified by the key hKey. | |
void | setAutoDelete (bool bAutoDelete) |
Enables or disabled the autodeletion feature. | |
~KviPointerHashTable () | |
Destroys the hash table and all the items contained within. | |
Protected Attributes | |
bool | m_bAutoDelete |
bool | m_bCaseSensitive |
bool | m_bDeepCopyKeys |
KviPointerList< KviPointerHashTableEntry< Key, T > > ** | m_pDataArray |
unsigned int | m_uCount |
unsigned int | m_uIteratorIdx = 0 |
unsigned int | m_uSize |
Friends | |
class | KviPointerHashTableIterator< Key, T > |
A fast pointer hash table implementation.
A very cool, very fast hash table implementation :P
To use this hash table you need to provide implementations for the following functions:
* unsigned int kvi_hash_hash(const Key & hKey, bool bCaseSensitive); * bool kvi_hash_key_equal(const Key & hKey1, const Key & hKey2, bool * bCaseSensitive); * void kvi_hash_key_copy(const Key & hKeyFrom, Key & hKeyTo, bool bDeepCopy); * void kvi_hash_key_destroy(Key & hKey, bool bIsDeepCopy); * const Key & kvi_hash_key_default(Key *); *
Implementations for the most likey Key data types are provided below. KviPointerHashTable will automagically work with const char, QString, KviCString and integer types as keys.
For string Key types, the hash table may or may not be case sensitive. For other Key types the case sensitive flag has no meaning and will (hopefully) be optimized out by the compiler.
For pointer based keys the hash table may or may not maintain deep copies of Key data. For example, with char * keys, if deep copying is enabled then a private copy of the string data will be maintained. With deep copying disabled only char * pointers will be kept. For types that do not have meaning of deep copy the deep copying code will (hopefully) be optimized out by the compiler.
The hashtable maintains an array of KviPointerList based buckets. The number of buckets may be specified by the application user and does NOT need to be a prime number. Yet better to have it a power of two so the memory allocation routines will feel better and are less likely to waste space.
|
inline |
Creates an empty hash table.
Automatic deletion is enabled.
uSize | The number of hash buckets: does NOT necesairly need to be prime |
bCaseSensitive | Are the key comparisons case sensitive ? |
bDeepCopyKeys | Do we need to maintain deep copies of keys ? |
References i, KviPointerHashTable< Key, T >::m_bAutoDelete, KviPointerHashTable< Key, T >::m_bCaseSensitive, KviPointerHashTable< Key, T >::m_bDeepCopyKeys, KviPointerHashTable< Key, T >::m_pDataArray, KviPointerHashTable< Key, T >::m_uCount, and KviPointerHashTable< Key, T >::m_uSize.
|
inline |
First creates an empty hash table and then inserts a copy of all the item pointers present in t.
The autodelete feature is automatically disabled (take care!).
t | The data to copy |
References KviPointerHashTable< Key, T >::copyFrom(), i, KviPointerHashTable< Key, T >::m_bAutoDelete, KviPointerHashTable< Key, T >::m_bCaseSensitive, KviPointerHashTable< Key, T >::m_bDeepCopyKeys, KviPointerHashTable< Key, T >::m_pDataArray, KviPointerHashTable< Key, T >::m_uCount, KviPointerHashTable< Key, T >::m_uSize, and t.
|
inline |
Destroys the hash table and all the items contained within.
Items are deleted if autodeletion is enabled.
References KviPointerHashTable< Key, T >::clear(), and KviPointerHashTable< Key, T >::m_pDataArray.
|
inline |
Removes all the items from the hash table.
The items are deleted if autodeletion is enabled. Invalidates the hash table iterator.
References e, i, kvi_hash_key_destroy(), KviPointerHashTable< Key, T >::m_bAutoDelete, KviPointerHashTable< Key, T >::m_bDeepCopyKeys, KviPointerHashTable< Key, T >::m_pDataArray, KviPointerHashTable< Key, T >::m_uCount, and KviPointerHashTable< Key, T >::m_uSize.
Referenced by KviIrcServerDataBase::clear(), KviCustomToolBarManager::clear(), KviTextIconManager::clear(), KviKvsAliasManager::clear(), KviKvsHash::clear(), KviKvsPopupManager::clear(), KviKvsScriptAddonManager::clear(), KviIconManager::clearCache(), KviPointerHashTable< Key, T >::copyFrom(), KviRegisteredUserDataBase::copyFrom(), KviUserIdentityManager::copyFrom(), KviKvsModuleInterface::kvsUnregisterAllCallbackCommands(), KviKvsModuleInterface::kvsUnregisterAllFunctions(), KviKvsModuleInterface::kvsUnregisterAllSimpleCommands(), KviKvsAliasManager::load(), KviKvsPopupManager::load(), KviAvatarCache::load(), KviUserIdentityManager::load(), KviTextIconManager::load(), RegisteredUserPropertiesDialog::okClicked(), KviKvsParser::parse(), KviKvsParser::parseAsExpression(), KviKvsParser::parseAsParameter(), KviPackageReader::readHeaderInternal(), KviUserListView::removeAllEntries(), ClassEditorWidget::~ClassEditorWidget(), and KviPointerHashTable< Key, T >::~KviPointerHashTable().
|
inline |
Removes all items in the hash table and then makes a complete shallow copy of the data contained in t.
The removed items are deleted if autodeletion is enabled. The hash table iterator is invalidated. Does not change autodelete flag: make sure you don't delete the items twice :)
t | The data to copy |
References KviPointerHashTable< Key, T >::clear(), e, KviPointerHashTable< Key, T >::insert(), and t.
Referenced by KviPointerHashTable< Key, T >::KviPointerHashTable().
|
inline |
Returns the number of items in this hash table.
References KviPointerHashTable< Key, T >::m_uCount.
Referenced by KviAvatarCache::cleanup(), KviConfigurationFile::clearKey(), KviUserListView::count(), KviCustomToolBarManager::descriptorCount(), RegisteredUsersDialog::exportClicked(), RegisteredUserPropertiesDialog::fillData(), OptionsWidget_textIcons::fillTable(), KviConfigurationFile::groupsCount(), KviIrcServerDataBase::networkCount(), KviPackageWriter::packInternal(), KviKvsPopupManager::popupCount(), KviAvatarCache::replace(), KviKvsHash::size(), KviUserListView::updateUsersLabel(), and KviUserListView::userStats().
|
inline |
Returns the data value pointer pointed by the hash table iterator.
This function must be preceded by a call to firstEntry(), first() or findRef().
References KviPointerList< T >::current(), e, KviPointerHashTable< Key, T >::m_pDataArray, KviPointerHashTable< Key, T >::m_uIteratorIdx, and KviPointerHashTable< Key, T >::m_uSize.
|
inline |
Returns the entry pointed by the hash table iterator.
This function must be preceded by a call to firstEntry(), first() or findRef().
References KviPointerList< T >::current(), KviPointerHashTable< Key, T >::m_pDataArray, KviPointerHashTable< Key, T >::m_uIteratorIdx, and KviPointerHashTable< Key, T >::m_uSize.
|
inline |
Returns the key pointed by the hash table iterator.
This function must be preceded by a call to firstEntry(), first() or findRef().
References KviPointerList< T >::current(), e, kvi_hash_key_default(), KviPointerHashTable< Key, T >::m_pDataArray, KviPointerHashTable< Key, T >::m_uIteratorIdx, and KviPointerHashTable< Key, T >::m_uSize.
|
inline |
Returns the item associated to the key.
Returns nullptr if no such item exists in the hash table. Places the hash table iterator at the position of the item found.
hKey | The key to find |
References e, KviPointerHashTable< Key, T >::first(), kvi_hash_hash(), kvi_hash_key_equal(), KviPointerHashTable< Key, T >::m_bCaseSensitive, KviPointerHashTable< Key, T >::m_pDataArray, KviPointerHashTable< Key, T >::m_uIteratorIdx, KviPointerHashTable< Key, T >::m_uSize, and KviPointerList< T >::next().
Referenced by KviRegisteredUserDataBase::addGroup(), KviRegisteredUserDataBase::addMask(), KviApplication::addRecentChannel(), KviKvsTimerManager::addTimer(), KviRegisteredUserDataBase::addUser(), AliasEditorWidget::aliasRefresh(), KviUserListView::avatarChanged(), ClassEditorWidget::build(), KviApplication::buildRecentChannels(), KviActionManager::category(), KviTextIconManager::checkDefaultAssociations(), ClassEditorWidget::classExists(), KviActionManager::coreActionExists(), KviCustomToolBarManager::create(), KviStatusBar::createApplet(), ClassEditorWidget::currentItemChanged(), KviIrcServerDataBase::currentNetwork(), KviUserIdentityManager::defaultIdentity(), KviKvsTimerManager::deleteTimer(), KviKvsTimerManager::deleteTimer(), KviCustomToolBarManager::destroyDescriptor(), KviKvsDnsManager::dnsLookupTerminated(), RegisteredUserEntryDialog::editAllPropertiesClicked(), KviUserListView::ensureVisible(), ClassEditorWidget::exportClasses(), KviActionDrawer::fill(), RegisteredUsersDialog::fillList(), KviKvsSwitchList::find(), KviCustomToolBarManager::find(), KviKvsHash::find(), KviKvsSwitchList::find(), KviIrcUserDataBase::find(), KviKvsSwitchList::find(), KviKvsSwitchList::find(), KviActionManager::findAction(), KviKvsScriptAddonManager::findAddon(), KviKvsKernel::findCoreCallbackCommandExecRoutine(), KviKvsKernel::findCoreFunctionExecRoutine(), KviKvsKernel::findCoreSimpleCommandExecRoutine(), KviUserListView::findEntry(), KviUserIdentityManager::findIdentity(), KviModuleManager::findModule(), KviIrcServerDataBase::findNetwork(), KviKvsKernel::findSpecialCommandParsingRoutine(), KviRegisteredUserDataBase::findUserByName(), DccBroker::findZeroPortTag(), KviUserListView::flags(), KviKvsHash::get(), KviActionManager::getAction(), KviRegisteredUser::getBoolProperty(), KviConfigurationFile::getCurrentGroup(), KviModuleManager::getModule(), KviIconManager::getPixmapWithCache(), KviIconManager::getPixmapWithCacheScaleOnLoad(), PluginManager::getPlugin(), KviRegisteredUser::getProperty(), KviRegisteredUser::getProperty(), KviIconManager::getSmallIconIdFromName(), KviKvsTreeNodeSwitchList::getStandardRebindingSwitch(), KviPackageReader::getStringInfoField(), KviRegisteredUserDataBase::getUser(), KviUserListView::getUserFlag(), KviUserListView::getUserJoinTime(), KviUserListView::getUserLastActionTime(), KviUserListView::getUserModeLevel(), KviConfigurationFile::hasKey(), KviCustomToolBarManager::idForNewToolBar(), KviIrcUserDataBase::insertUser(), AddonFunctions::installAddonPackage(), ThemeFunctions::installThemePackage(), PluginManager::isPluginLoaded(), KviKvsObjectClass::isScriptHandler(), KviUserListView::join(), KviKvsObjectClass::KviKvsObjectClass(), KviKvsModuleInterface::kvsFindCallbackCommand(), KviKvsModuleInterface::kvsFindFunction(), KviKvsModuleInterface::kvsFindSimpleCommand(), KviConfigurationFile::load(), KviRegisteredUserDataBase::load(), KviTextIconManager::load(), KviAvatarCache::lookup(), KviKvsAliasManager::lookup(), KviKvsPopupManager::lookup(), KviKvsObjectController::lookupClass(), KviKvsObject::lookupFunctionHandler(), KviKvsObjectClass::lookupFunctionHandler(), KviKvsObjectController::lookupObject(), KviTextIconManager::lookupTextIcon(), KviIrcServerDataBase::makeCurrentServer(), KviActionManager::nameForAutomaticAction(), KviUserListView::nickChange(), KviPointerHashTable< Key, T >::operator[](), KviKvsParser::parsePercent(), KviUserListView::partInternal(), KviSoundPlayer::play(), PopupEditorWidget::popupRefresh(), KviHttpRequest::processHeader(), KviConfigurationFile::readBoolEntry(), KviConfigurationFile::readCharEntry(), KviConfigurationFile::readColorEntry(), KviConfigurationFile::readEntry(), KviConfigurationFile::readFontEntry(), KviConfigurationFile::readIntEntry(), KviConfigurationFile::readIntListEntry(), KviConfigurationFile::readMsgTypeEntry(), KviConfigurationFile::readPixmapEntry(), KviConfigurationFile::readRectEntry(), KviConfigurationFile::readStringListEntry(), KviConfigurationFile::readUCharEntry(), KviConfigurationFile::readUIntEntry(), KviConfigurationFile::readUShortEntry(), KviApplication::recentChannelsForNetwork(), KviActionManager::registerAction(), KviRegisteredUserDataBase::removeUser(), KviCustomToolBarManager::renameDescriptor(), KviUserListView::select(), KviKvsTimerManager::timerEvent(), KviKvsTimerManager::timerExists(), KviMessageCatalogue::translate(), KviMessageCatalogue::translateToQString(), KviCustomToolBar::unfilterChild(), KviActionManager::unregisterAction(), KviUserListView::userAction(), KviUserListView::userAction(), KviUserListView::userAction(), and KviUserListView::userActionVerifyMask().
|
inline |
Searches for the item pointer pRef.
Returns its hash table entry, if found, and nullptr otherwise. The hash table iterator is placed at the item found.
pRef | The pointer to search |
References e, KviPointerHashTable< Key, T >::first(), KviPointerHashTable< Key, T >::m_pDataArray, KviPointerHashTable< Key, T >::m_uIteratorIdx, KviPointerHashTable< Key, T >::m_uSize, and KviPointerList< T >::next().
Referenced by KviKvsObjectController::clearUserClasses(), and ClassEditorWidget::renameNamespace().
|
inline |
Places the hash table iterator at the first entry.
It returns the associated data value pointer.
References e, KviPointerList< T >::first(), KviPointerHashTable< Key, T >::m_pDataArray, KviPointerHashTable< Key, T >::m_uIteratorIdx, and KviPointerHashTable< Key, T >::m_uSize.
Referenced by KviTextIconManager::applyOptions(), ChannelsJoinDialog::deleteClicked(), RegisteredUsersDialog::fillList(), ChannelsJoinDialog::fillListView(), KviPointerHashTable< Key, T >::find(), KviPointerHashTable< Key, T >::findRef(), KviPointerHashTable< Key, T >::insert(), KviPointerHashTable< Key, T >::remove(), and KviPointerHashTable< Key, T >::removeRef().
|
inline |
Places the hash table iterator at the first entry and returns it.
References KviPointerList< T >::first(), KviPointerHashTable< Key, T >::m_pDataArray, KviPointerHashTable< Key, T >::m_uIteratorIdx, and KviPointerHashTable< Key, T >::m_uSize.
Referenced by RegisteredUsersDialog::exportClicked(), and RegisteredUsersDialog::rightButtonPressed().
|
inline |
Inserts the item pData at the position specified by the key hKey.
Replaces any previous item with the same key The replaced item is deleted if autodelete is enabled. The hash table iterator is placed at the newly inserted item.
hKey | The key where to insert data |
pData | The data to insert |
References KviPointerList< T >::append(), e, KviPointerHashTable< Key, T >::first(), kvi_hash_hash(), kvi_hash_key_copy(), kvi_hash_key_destroy(), kvi_hash_key_equal(), KviPointerHashTable< Key, T >::m_bAutoDelete, KviPointerHashTable< Key, T >::m_bCaseSensitive, KviPointerHashTable< Key, T >::m_bDeepCopyKeys, KviPointerHashTable< Key, T >::m_pDataArray, KviPointerHashTable< Key, T >::m_uCount, KviPointerHashTable< Key, T >::m_uSize, n, and KviPointerList< T >::next().
Referenced by KviApplication::addRecentChannel(), KviKvsTimerManager::addTimer(), KviIconManager::addToCache(), DccBroker::addZeroPortTag(), KviApplication::buildRecentChannels(), KviPointerHashTable< Key, T >::copyFrom(), ClassEditorWidget::createFullClass(), ClassEditorWidget::currentItemChanged(), RegisteredUsersDialog::editGroup(), RegisteredUsersDialog::fillList(), KviCustomToolBar::filterChild(), KviKvsObjectController::init(), KviPointerHashTable< Key, T >::insert(), KviIrcUserDataBase::insertUser(), KviUserListView::insertUserEntry(), KviKvsObjectClass::KviKvsObjectClass(), KviSoundPlayer::KviSoundPlayer(), KviKvsAliasManager::load(), KviKvsPopupManager::load(), KviMessageCatalogue::load(), KviModuleManager::loadModule(), ClassEditorWidget::loadNotBuiltClasses(), PluginManager::loadPlugin(), ClassEditorWidget::newClass(), objects_kvs_fnc_classes(), ClassEditorWidget::oneTimeSetup(), KviActionManager::registerAction(), KviKvsObjectController::registerClass(), RegisteredUserEntryDialog::RegisteredUserEntryDialog(), KviKvsObjectController::registerObject(), ClassEditorWidget::renameClass(), ClassEditorWidget::renameNamespace(), KviPointerHashTable< Key, T >::replace(), and KviMessageCatalogue::translateToQString().
|
inline |
Inserts a complete shallow copy of the data contained in t.
The hash table iterator is invalidated.
t | The data to insert |
References e, KviPointerHashTable< Key, T >::insert(), and t.
|
inline |
Returns true if the hash table is empty.
References KviPointerHashTable< Key, T >::m_uCount.
Referenced by KviKvsTimerManager::deleteAllTimers(), KviKvsHash::isEmpty(), KviKvsObject::registerPrivateImplementation(), KviPointerHashTable< Key, T >::remove(), KviPointerHashTable< Key, T >::removeRef(), and KviModuleManager::unloadModule().
|
inline |
Places the hash table iterator at the next entry and returns the associated data value pointer.
This function must be preceded by a call to firstEntry(), first() or findRef().
References e, KviPointerList< T >::first(), KviPointerHashTable< Key, T >::m_pDataArray, KviPointerHashTable< Key, T >::m_uIteratorIdx, KviPointerHashTable< Key, T >::m_uSize, KviPointerList< T >::next(), and t.
Referenced by KviTextIconManager::applyOptions(), ChannelsJoinDialog::deleteClicked(), RegisteredUsersDialog::fillList(), and ChannelsJoinDialog::fillListView().
|
inline |
Places the hash table iterator at the next entry and returns it.
This function must be preceded by a call to firstEntry(), first() or findRef().
References KviPointerList< T >::first(), KviPointerHashTable< Key, T >::m_pDataArray, KviPointerHashTable< Key, T >::m_uIteratorIdx, KviPointerHashTable< Key, T >::m_uSize, KviPointerList< T >::next(), and t.
Referenced by RegisteredUsersDialog::exportClicked(), and RegisteredUsersDialog::rightButtonPressed().
|
inline |
Returns the item associated to the key hKey.
Returns nullptr if no such item exists in the hash table. Places the hash table iterator at the position of the item found. This is an alias to find().
hKey | The key to find |
References KviPointerHashTable< Key, T >::find().
|
inline |
Removes the item pointer associated to the key hKey, if such an item exists in the hash table.
The item is deleted if autodeletion is enabled. Returns true if the item was found and removed and false if it wasn't found. Invalidates the hash table iterator.
hKey | The key where to remove the pointer |
References e, KviPointerHashTable< Key, T >::first(), KviPointerHashTable< Key, T >::isEmpty(), kvi_hash_hash(), kvi_hash_key_destroy(), kvi_hash_key_equal(), KviPointerHashTable< Key, T >::m_bAutoDelete, KviPointerHashTable< Key, T >::m_bCaseSensitive, KviPointerHashTable< Key, T >::m_bDeepCopyKeys, KviPointerHashTable< Key, T >::m_pDataArray, KviPointerHashTable< Key, T >::m_uCount, KviPointerHashTable< Key, T >::m_uSize, KviPointerList< T >::next(), and KviPointerList< T >::removeRef().
Referenced by KviActionManager::actionDestroyed(), PluginManager::checkUnload(), KviAvatarCache::cleanup(), KviConfigurationFile::clearKey(), KviKvsTimerManager::deleteTimer(), KviKvsTimerManager::deleteTimer(), KviCustomToolBarManager::destroyDescriptor(), KviKvsDnsManager::dnsLookupTerminated(), RegisteredUserEntryDialog::editAllPropertiesClicked(), RegisteredUsersDialog::editGroup(), KviCustomToolBar::filteredChildDestroyed(), DccBroker::findZeroPortTag(), KviKvsTreeNodeSwitchList::getStandardRebindingSwitch(), KviKvsModuleInterface::kvsUnregisterCallbackCommand(), KviKvsModuleInterface::kvsUnregisterFunction(), KviKvsModuleInterface::kvsUnregisterSimpleCommand(), RegisteredUserEntryDialog::okClicked(), KviUserListView::partInternal(), KviKvsObject::registerPrivateImplementation(), KviAvatarCache::remove(), KviKvsAliasManager::remove(), KviKvsPopupManager::remove(), KviRegisteredUserDataBase::removeGroup(), KviRegisteredUserDataBase::removeUser(), KviIrcUserDataBase::removeUser(), DccBroker::removeZeroPortTag(), KviCustomToolBarManager::renameDescriptor(), KviRegisteredUser::setProperty(), texticons_kvs_cmd_set(), PluginManager::unloadAll(), KviModuleManager::unloadModule(), KviActionManager::unregisterAction(), KviKvsScriptAddonManager::unregisterAddon(), KviKvsObjectController::unregisterClass(), KviKvsObjectController::unregisterObject(), and KviKvsHash::unset().
|
inline |
Removes the first occurrence of the item pointer pRef.
The item is deleted if autodeletion is enabled. Returns true if the pointer was found and false otherwise. Invalidates the hash table iterator.
pRef | The pointer to remove the first occurrence |
References e, KviPointerHashTable< Key, T >::first(), i, KviPointerHashTable< Key, T >::isEmpty(), kvi_hash_key_destroy(), KviPointerHashTable< Key, T >::m_bAutoDelete, KviPointerHashTable< Key, T >::m_bDeepCopyKeys, KviPointerHashTable< Key, T >::m_pDataArray, KviPointerHashTable< Key, T >::m_uCount, KviPointerHashTable< Key, T >::m_uSize, KviPointerList< T >::next(), and KviPointerList< T >::removeRef().
Referenced by ClassEditorWidget::removeItem(), ClassEditorWidget::removeItemChildren(), ClassEditorWidget::renameClass(), and ClassEditorWidget::renameNamespace().
|
inline |
Inserts the item pData at the position specified by the key hKey.
Replaces any previous item with the same key. The replaced item is deleted if autodelete is enabled. The hash table iterator is placed at the newly inserted item. This is just an alias to insert() with a different name.
hKey | The key where to insert data |
pData | The new data to insert |
References KviPointerHashTable< Key, T >::insert().
Referenced by KviKvsAliasManager::add(), KviKvsPopupManager::add(), KviKvsDnsManager::addDns(), KviRegisteredUserDataBase::addGroup(), KviPackageWriter::addInfoField(), KviPackageWriter::addInfoField(), KviKvsTreeNodeSwitchList::addLong(), KviKvsSwitchList::addLong(), KviIrcServerDataBase::addNetwork(), KviKvsTreeNodeSwitchList::addShort(), KviKvsSwitchList::addShort(), KviRegisteredUserDataBase::addUser(), KviUserIdentityManager::copyFrom(), KviCustomToolBarManager::create(), KviUserIdentityManager::defaultIdentity(), KviKvsScriptAddonManager::delayedLoad(), RegisteredUserEntryDialog::editAllPropertiesClicked(), KviActionDrawer::fill(), KviKvsHash::get(), KviIconManager::getSmallIconIdFromName(), KviRegisteredUserDataBase::getUser(), KviTextIconManager::insert(), KviTextIconManager::insert(), KviKvsHash::KviKvsHash(), KviKvsModuleInterface::kvsRegisterCallbackCommand(), KviKvsModuleInterface::kvsRegisterFunction(), KviKvsModuleInterface::kvsRegisterSimpleCommand(), KviConfigurationFile::load(), KviAvatarCache::load(), KviUserIdentityManager::load(), KviCustomToolBarManager::load(), KviTextIconManager::load(), KviIrcServerDataBase::makeCurrentServer(), RegisteredUserPropertiesDialog::okClicked(), KviKvsParser::parseSpecialCommandGlobal(), KviHttpRequest::processHeader(), KviPackageReader::readHeaderInternal(), KviKvsScriptAddonManager::registerAddon(), KviStatusBar::registerAppletDescriptor(), KviKvsKernel::registerCoreCallbackCommandExecRoutine(), KviKvsKernel::registerCoreFunctionExecRoutine(), KviKvsKernel::registerCoreSimpleCommandExecRoutine(), KviKvsObjectClass::registerFunctionHandler(), KviKvsObjectClass::registerFunctionHandler(), KviKvsObject::registerPrivateImplementation(), KviKvsKernel::registerSpecialCommandParsingRoutine(), KviKvsObjectClass::registerStandardFalseReturnFunctionHandler(), KviKvsObjectClass::registerStandardNothingReturnFunctionHandler(), KviKvsObjectClass::registerStandardTrueReturnFunctionHandler(), KviCustomToolBarManager::renameDescriptor(), KviAvatarCache::replace(), KviKvsHash::set(), KviRegisteredUser::setProperty(), KviConfigurationFile::writeEntry(), KviConfigurationFile::writeEntry(), KviConfigurationFile::writeEntry(), KviConfigurationFile::writeEntry(), KviConfigurationFile::writeEntry(), KviConfigurationFile::writeEntry(), KviConfigurationFile::writeEntry(), KviConfigurationFile::writeEntry(), KviConfigurationFile::writeEntry(), KviConfigurationFile::writeEntry(), KviConfigurationFile::writeEntry(), KviConfigurationFile::writeEntry(), KviConfigurationFile::writeEntry(), and KviConfigurationFile::writeEntry().
|
inline |
Enables or disabled the autodeletion feature.
Items are deleted upon removal when the feature is enabled.
bAutoDelete | Set the autodelete state |
References KviPointerHashTable< Key, T >::m_bAutoDelete.
Referenced by KviKvsDnsManager::addDns(), KviKvsTreeNodeSwitchList::addLong(), KviKvsSwitchList::addLong(), KviKvsTreeNodeSwitchList::addShort(), KviKvsSwitchList::addShort(), KviCustomToolBar::beginCustomize(), KviApplication::buildRecentChannels(), ClassEditorWidget::ClassEditorWidget(), KviIrcUserDataBase::clear(), KviKvsObjectController::clearInstances(), config_module_init(), DccDescriptor::copyFrom(), ClassEditorWidget::currentItemChanged(), DccBroker::DccBroker(), DccDescriptor::DccDescriptor(), RegisteredUsersDialog::editGroup(), KviActionDrawer::fill(), RegisteredUsersDialog::fillList(), KviConfigurationFile::getCurrentGroup(), KviIconManager::getSmallIconIdFromName(), KviKvsTreeNodeSwitchList::getStandardRebindingSwitch(), KviActionManager::KviActionManager(), KviAvatarCache::KviAvatarCache(), KviCustomToolBarManager::KviCustomToolBarManager(), KviIconManager::KviIconManager(), KviIrcServerDataBase::KviIrcServerDataBase(), KviIrcUserDataBase::KviIrcUserDataBase(), KviKvsAliasManager::KviKvsAliasManager(), KviKvsHash::KviKvsHash(), KviKvsHash::KviKvsHash(), KviKvsKernel::KviKvsKernel(), KviKvsModuleInterface::KviKvsModuleInterface(), KviKvsObjectClass::KviKvsObjectClass(), KviKvsObjectController::KviKvsObjectController(), KviKvsPopupManager::KviKvsPopupManager(), KviKvsScriptAddonManager::KviKvsScriptAddonManager(), KviKvsTimerManager::KviKvsTimerManager(), KviLocale::KviLocale(), KviMessageCatalogue::KviMessageCatalogue(), KviModuleManager::KviModuleManager(), KviPackageIOEngine::KviPackageIOEngine(), KviRegisteredUserDataBase::KviRegisteredUserDataBase(), KviSoundPlayer::KviSoundPlayer(), KviStatusBar::KviStatusBar(), KviTextIconManager::KviTextIconManager(), KviUserIdentityManager::KviUserIdentityManager(), KviUserListView::KviUserListView(), KviConfigurationFile::load(), KviMessageCatalogue::load(), objects_kvs_fnc_classes(), options_module_init(), KviKvsParser::parseSpecialCommandGlobal(), perlcore_module_init(), PluginManager::PluginManager(), KviHttpRequest::processHeader(), RegisteredUserEntryDialog::RegisteredUserEntryDialog(), KviKvsObject::registerPrivateImplementation(), KviCustomToolBarManager::renameDescriptor(), KviRegisteredUser::setProperty(), KviKvsScriptAddonManager::unregisterAddon(), and KviKvsTimerManager::~KviKvsTimerManager().
|
friend |
|
protected |
Referenced by KviPointerHashTable< Key, T >::clear(), KviPointerHashTable< Key, T >::insert(), KviPointerHashTable< Key, T >::KviPointerHashTable(), KviPointerHashTable< Key, T >::KviPointerHashTable(), KviPointerHashTable< Key, T >::remove(), KviPointerHashTable< Key, T >::removeRef(), and KviPointerHashTable< Key, T >::setAutoDelete().
|
protected |
|
protected |
|
protected |
Referenced by KviPointerHashTable< Key, T >::clear(), KviPointerHashTable< Key, T >::current(), KviPointerHashTable< Key, T >::currentEntry(), KviPointerHashTable< Key, T >::currentKey(), KviPointerHashTable< Key, T >::find(), KviPointerHashTable< Key, T >::findRef(), KviPointerHashTable< Key, T >::first(), KviPointerHashTable< Key, T >::firstEntry(), KviPointerHashTable< Key, T >::insert(), KviPointerHashTable< Key, T >::KviPointerHashTable(), KviPointerHashTable< Key, T >::KviPointerHashTable(), KviPointerHashTable< Key, T >::next(), KviPointerHashTable< Key, T >::nextEntry(), KviPointerHashTable< Key, T >::remove(), KviPointerHashTable< Key, T >::removeRef(), and KviPointerHashTable< Key, T >::~KviPointerHashTable().
|
protected |
Referenced by KviPointerHashTable< Key, T >::clear(), KviPointerHashTable< Key, T >::count(), KviPointerHashTable< Key, T >::insert(), KviPointerHashTable< Key, T >::isEmpty(), KviPointerHashTable< Key, T >::KviPointerHashTable(), KviPointerHashTable< Key, T >::KviPointerHashTable(), KviPointerHashTable< Key, T >::remove(), and KviPointerHashTable< Key, T >::removeRef().
|
protected |
Referenced by KviPointerHashTable< Key, T >::current(), KviPointerHashTable< Key, T >::currentEntry(), KviPointerHashTable< Key, T >::currentKey(), KviPointerHashTable< Key, T >::find(), KviPointerHashTable< Key, T >::findRef(), KviPointerHashTable< Key, T >::first(), KviPointerHashTable< Key, T >::firstEntry(), KviPointerHashTable< Key, T >::next(), and KviPointerHashTable< Key, T >::nextEntry().
|
protected |
Referenced by KviPointerHashTable< Key, T >::clear(), KviPointerHashTable< Key, T >::current(), KviPointerHashTable< Key, T >::currentEntry(), KviPointerHashTable< Key, T >::currentKey(), KviPointerHashTable< Key, T >::find(), KviPointerHashTable< Key, T >::findRef(), KviPointerHashTable< Key, T >::first(), KviPointerHashTable< Key, T >::firstEntry(), KviPointerHashTable< Key, T >::insert(), KviPointerHashTable< Key, T >::KviPointerHashTable(), KviPointerHashTable< Key, T >::KviPointerHashTable(), KviPointerHashTable< Key, T >::next(), KviPointerHashTable< Key, T >::nextEntry(), KviPointerHashTable< Key, T >::remove(), and KviPointerHashTable< Key, T >::removeRef().